Whidbey Island: north of Seattle, east of Victoria, south of Vancouver
Posts
299
Thanks
Thanks for the offer jweeks, but I do not have CS3. I have Flash8, but that does not accommodate AS3. Could you just cut and paste the code? What you see is what it is.
Interesting. Are you trying to do this in AS2? It's written like it's for AS3.
What errors are you getting?
Also, if it's in flash 8 I should be able to open it. The FLA wouldn't open though.
Anyway, when I try to make my own file, it'll work if I put it in the proper location indicated by your package. You have to keep that same folder structure. Are you using that structure?
Whidbey Island: north of Seattle, east of Victoria, south of Vancouver
Posts
299
miscom
I mis-communicated. I have two versions of Flash 8 & 10. You are quite right. My files won't work in Flash 8. I'm pretty sure my problem relates to the code on my fla. I just did what someone told me to do. I don't understand that code, so that makes it suspect.
My class file has two functions; one creates the background, the other creates the header container. What puzzles me is the need to use addChild on the fla when I've already done that in the class. I'll just need to study up.
Honestly that's one of flashes idiosyncrasies that we all kinda gotta get used to. It's odd I know but, let me try to explain it like this.
Your calling the class, which adds children, but the class is out in space somewhere doing it's thing until, you tell flash to add it to your FLA file. So basically, flash says, hey, I have this class telling me to do stuff, but I'm not suposed to add it yet, so I'm not going to, and I'm not going to until I'm told to because this class extends Sprite and therefore is a sprite in my eyes.
Whidbey Island: north of Seattle, east of Victoria, south of Vancouver
Posts
299
Sense and sensibilty
Yep. That does. The funny thing is that it is hard to find an explanation of the mechanics of this. I've seen explanations about classes in the abstract (e.g., how to create them and import them), but these classes are always utilities. I've seen none that use the drawing interface. Most examples add classes to a Flash file with visual assets.
I feel like I'm at the door. I've got the key, but I'm not sure how to fit it into the lock.
I've been able to make class files that I can test in an unsaved fla, but I had trouble with the path. I wonder if that still isn't the problem. I set up my file structure to match my site name (org>keelworks>folders).
I just discovered that Essential ActionScript 3.0, Chapter 29 covers much of my puzzle (Moock is good, but he can be a bit odd in his information structuring). I'll read that right away and report the results today. I really have no business asking questions if I haven't done my homework.
Whidbey Island: north of Seattle, east of Victoria, south of Vancouver
Posts
299
OK. If you are wondering how brilliant you have to be to generate this error, check this: I imported the class twice, once on the timeline and once on the properties>Class field. That will do it.
I've been tearing my hair trying to figure out how to put my feet on the ground. Now I'm hoping to find something firm to pull my self up with; someday, I hope to walk!!
You should import class relative to .swf file either in property panel or in action script panel. Don't import in both. I have having same problem but it i Solved it this way.
Thank you.
Dinesh Gill Insan.