Jump to content
GreenSock

suchi89

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by suchi89

  1. Hi and welcome to the GreenSock support forums?

     

    Have you tried LoaderMax's SWFLoader? It makes it very easy to load swfs.

     

    I don't know how much AS3 you know so I'll just give you a little to help you get started

     

     

    import com.greensock.*;
    import com.greensock.events.LoaderEvent;
    import com.greensock.loading.SWFLoader;
    
    
    var intro:SWFLoader = new SWFLoader("intro.swf", {container:this, x:100, y:100, onComplete:completeHandler});
    intro.load();
    
    
    function completeHandler(e:LoaderEvent):void{
    trace(e.target) // the loader that fired the event
    trace("intro complete");
    }

    I've attached the CS5 fla and swf.

     

    Thanks for the reply. I have modified this script as below and the skip intro button is working fine.

    import com.greensock.*;
    import com.greensock.events.LoaderEvent;
    import com.greensock.loading.SWFLoader;
    
    skipbutton.addEventListener(MouseEvent.CLICK, fl_ClickToGoToAndStopAtFrame);
    
    function fl_ClickToGoToAndStopAtFrame(event:MouseEvent):void
    {
    	var intro:SWFLoader = new SWFLoader("main.swf", {container:this, x:0, y:0});
    	SoundMixer.stopAll()
    	intro.load();
    }
    
    

    But I have one more problem. When timeline reaches last frame of the intro.swf, the main.swf should be loaded. Both the swf has different audios. I have put the another script in the last frame of the intro.swf. The main.swf of is loading without its audio, but the audio of the intro.swf is replaying for it. What I need is when the main.swf is loading the intro's audio must be stopped and the start playing main.swf's audio itself.Please help.

    import com.greensock.*;
    import com.greensock.events.LoaderEvent;
    import com.greensock.loading.SWFLoader;
    
    
    	var intro:SWFLoader = new SWFLoader("main.swf", {container:this, x:0, y:0});
    	SoundMixer.stopAll()
    	intro.load();
    
  2. I am a newbie in Action script 3. I have 2 swf files. One is intro.swf and another is the main.swf. When clicking the skip intro button in the intro.swf i need to close the intro and play the main.swf. Also when the last frame of the intro reaches, the main.swf should start playing. Is there any way in AS3 to do these two parts?

     

×