1 Reply Latest reply on Mar 11, 2010 5:44 AM by Sam Souhrada

    Preloader problem

    Flex Group

      I had created custom preloader in i have to delay the preloader for some time i done it but

      after complete the preloader only the application load but i need the preloader must delay for sometimes but application will load

        • 1. Re: Preloader problem
          Sam Souhrada Level 1

          This demo will show you how to put a delay before initilazing the flex application:





          In the source of his preloader.as...


           private function onFlexInitComplete( event:FlexEvent ):void 
                      clip.addFrameScript(21, onDoneAnimating);
                      clip.gotoAndPlay("fade out");
                   * If the Flash MovieClip is done playing it's animation,
                   * I stop it and dispatch my event letting Flex know I'm done.
                   * @param event
                  private function onDoneAnimating():void
                      dispatchEvent( new Event( Event.COMPLETE ) );

          He waits for an event - but you could put a timer in there if you wanted to have a set amount of time to wait.

          Mark this as an answer if it helps out