awesome - thanks.... ________________________________________ From: flashcoders-boun...@chattyfig.figleaf.com [flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Kerry Thompson [al...@cyberiantiger.biz] Sent: Tuesday, February 23, 2010 12:36 PM To: Flash Coders List Subject: Re: [Flashcoders] Finding and Removing a Sprite
Theodore Lehr wrote: > thanks for all of the help... I did resolve it by taking the functions out of > the other functions... and creating the sprite at the root (outside of the > functions) Glad you got it fixed. I'm late to the discussion, so didn't contribute anything yet--but I will now :-) Do yourself a favor now. One of the real advantages of AS3 is eliminating timeline code--you have to do that eventually to take advantage of AS3's OOP capabilities. Make a backup of your .fla before you do this, in case something goes wrong. In the same folder where your .fla file is, create an ActionScript file called Main.as. Inside it, use this: package { public class Main extends Sprite { //functions go here } } Now cut and paste all your code from the timeline and put it after the line //functions go here. You can overwrite that line--just keep your functions in between the inner set of curly brackets. In the .fla file, in the Properties window, set your document class to Main. Remember, ActionScript is case sensitive. It should compile and run the same as before, but you will have taken a good first step towards utilizing AS3's power. Cordially, Kerry Thompson _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders