On Mon, Nov 16, 2009 at 4:55 AM, tom rhodes <[email protected]> wrote:
> hey beno, you'll probably have more luck in here than the OSFlash list as > that is a more specialised place, there used to be a flash newbie list too > on chattyfig, don't know if it's still around. > > firstly if you want to carry on with your current approach each class is a > unique .as file. you need to read about class structure, > http://www.adobe.com/devnet/actionscript/getting_started.html I've now read this tutorial. What a great resource, thanks! also, from what you were saying on the other list you are trying to create > an animation. why not do it on the timeline? First, boy I wish you'd mentioned this list when I was begging for the name/url of such a list. This list was hard to find :( I originally built this on the timeline and it works there. Why do I want it in a package? So that I can be more dynamic/flexible with it. Not that I'll use that flexibility for this project, but so that I have the best tools available from the beginning of becoming a Flash programmer. Here is my code to the moment. Unfortunately, I can't test it for reasons that don't bear going into right now; however, I believe I tested this incarnation with unsatisfactory results: package { import flash.display.MovieClip; import com.greensock.*; import com.greensock.plugins.*; import com.greensock.easing.*; public class Main extends MovieClip { public function Main():void { public function mcHatAndFace():void { TweenPlugin.activate([AutoAlphaPlugin]); var mcHatAndFace = new MovieClip(); this.addChild(mcHatAndFace); mcHatAndFace.x = 100; mcHatAndFace.y = 100; mcHatAndFace.alpha = 0; TweenLite.to(mcHatAndFace, 1, {autoAlpha:1}); // 2nd param in seconds; 3rd in % alpha } var main:Main = new Main(); addChild(main); main.mcHatAndFace(); } } } TIA, beno _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

