On Mon, Nov 16, 2009 at 5:00 PM, Barry Hannah <ba...@shift.co.nz> wrote:
> OK, I'm lost. > Me too :) > You need a function "mcHatAndFace" so you can "call" an asset from the > library? > > Does > var myHatAndFaceInstance:mcHatAndFace = new mcHatAndFace(); > > not work? > I exported mcHatAndFace from the library to the first frame of Main.as Below is the latest incarnation of the code. Here's the error it threw: Type was not found or was not a compile-time constant: mcHatAndFace 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 { var mcHatAndFaceInstance:mcHatAndFace = new mcHatAndFace(); 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(); } } } Please advise. > I suspect classes and subclasses might be beyond your level of ability > right now, may I respectfully suggest you learn a bit more about why and > how you use classes before dropping yourself in it? > Sounds good to me :) > > In the meantime keep firing questions about how to do specific things > (as above) - the answers for those smaller questions might be more > digestible. > Well, now that's the point! I kinda thought the whole concept of multiple classes was overkill. beno _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders