2 Replies Latest reply on May 11, 2011 6:01 AM by jsmith1701

    Question regarding loading external swf, then going to frame in root timeline

    jsmith1701

      Hello,

      I am a newb working on a project, and here is what I'm trying to do: when a button is clicked, I want an external swf to load and play, then I want to go back to a particular frame in the original timeline. What would be the code for this? Any help would be greatly appreciated. CS4, AS3

        • 1. Re: Question regarding loading external swf, then going to frame in root timeline
          kglad Adobe Community Professional & MVP

          this is not good coding but it's probably in-line with what you're already doing:

           

          MovieClip(root).gotoAndStop("whateverframelabel");

          • 2. Re: Question regarding loading external swf, then going to frame in root timeline
            jsmith1701 Level 1

            OK, that didn't work, but it's more likely because I'm an idiot, and didn't put it in the right place.

            So, on frame 1 of my timeline, I have a button. When the button is clicked, I want an external swf file to load and play. Then I want to go back to frame 7 in the original timeline.

             

            On frame 1 I have this:

             

            btn1.addEventListener(MouseEvent.CLICK, zmbemovie)
            function zmbemovie(event:MouseEvent){
            var pageloader:Loader=new Loader();
            addChild(pageloader);
            pageloader.load(new URLRequest("zombie3.swf"));

            }

             

            The above code works to the point that when the button is clicked, the external swf loads and plays, but thats it. Where would I insert that code snippet so it will go to frame 7 of the original timeline? Or, is there a better way of going about doing this? Thank You for all of your assistance.