3 Replies Latest reply on Feb 25, 2009 1:51 PM by Handycam

    Creating effect in Actionscript instead of MXML?

    Handycam Level 1
      I am applying an effect to a pop-up window. Currently, I am doing that by creating a Parallel sequence in MXML:

      <mx:Parallel id="fadeIn">
      <mx:Fade alphaFrom="0" alphaTo="1" duration="1000"/>

      And then I call it from the function that creates the PopUp:

      private function makeIntro():void {
      intro = views.IntroWindow(PopUpManager.createPopUp(this,views.IntroWindow,true));
      fadeIn.target = intro;

      Works fine. But I'd really like to do it in Actionscript, and -- even better -- make it into a Class so I can use it in my other projects easier.

      If it was a class, what would the base class be? Sprite? And then I assume import mx.effects.Parallel, create a new object as in

      private var myFader:Parallel = new Parallel();

      at this point I'v e gotten stuck and am wondering if I'm even on the right path...