1 Reply Latest reply on Jun 6, 2011 7:28 AM by Ned Murphy

    How do I control transparency of loaded movie?

    Tonezone

      I have used a loader to play a swf, and I've managed to scale it like I want it - now I would like for it to fade in and out. How do i do that? Below is the as3 script I am using:

       

      var loader:Loader=new Loader();
      loader.contentLoaderInfo.addEventListener(Event.COMPLETE,f);
      loader.load(new URLRequest("BldgBanner_r3an.swf"));
      addChild(loader);

      function f(e:Event):void{
      loader.scaleX=.80;
      loader.scaleY=.80;
      }

        • 1. Re: How do I control transparency of loaded movie?
          Ned Murphy Adobe Community Professional & MVP

          First set the alpha of the Loader to 0.  Then use tweening code to manage the fading after the loading is complete.  If you aren't familiar with actionscript tweening, you can decomplicate getting started by just using the built-in Tween class  for starters (see the help docs).  When you have a comfort level working with tweening code, or if you are familiar with installing new classes and utilizing them, then you might consider moving on to third party tweening classes such as TweenMax/Lite... reportedly much better performing classes than the Tween class.