29 Replies Latest reply on Jul 8, 2009 2:24 PM by kglad

    Question on getting back to main timeline in loaded ext. SWF

    ActivEdit

      I have a project I'm working on where the user is presented with an overhead shot of a building and is able to mouse-over the different rooms to choose one to "enter." Once clicked, the chosen room is an external .SWF that is loaded that has options to view other external .SWFs within that room. Problem is, within the first loaded .SWF, I have a "home" button that is supposed to take the viewer back to the main overhead view but I can't get the AS to work. I've tried _parent and _root with no luck (not sure I even typed out right code). I'm pretty much a self-taught beginner using Flash Pro 8, so any help is greatly appreciated. thanks!

        • 1. Re: Question on getting back to main timeline in loaded ext. SWF
          kglad Adobe Community Professional & MVP

          from your loaded swf's main timeline you can always call:

           

          function removeThisF(){

          this.swapDepths(this._parent.getNextHighestDepth());

          this.removeMovieClip();

          }

          • 2. Re: Question on getting back to main timeline in loaded ext. SWF
            ActivEdit Level 1

            kglad, thanks but I'm not sure I understand - I want the return to the main timeline to be a function of a movieClip button in the loaded .swf...I'll paste some of the code I currently have as functions for the button. Is there a way to just add to the function list here to get to the 1st frame of the scene called "Main" in my Top Level project? Thanks!

             

             

            //------------------Buttons

            btnHome_mc.onRelease = function () {
                 mcLoader.unloadClip(myLoader);
                 btnSQL_btn.enabled = true;
                 btnDyna_btn.enabled = true;
                 btnAlert_btn.enabled = true;
                 btnIT_mc.visible = false;
                 btnIT_mc.enabled = false;
            }

            • 3. Re: Question on getting back to main timeline in loaded ext. SWF
              kglad Adobe Community Professional & MVP

              use:

               

              // in your loaded swf's main timeline

               

              function removeThisF(){

              this.swapDepths(this._parent.getNextHighestDepth());

              this.removeMovieClip();

              }

               


               

               

              //------------------Buttons

              btnHome_mc.onRelease = function () {


                   path.removeThisF();  // where path is the path to removeThisF();

              // all the code below is meaningless because none of those will exist after the above line executes.

                   btnSQL_btn.enabled = true;
                   btnDyna_btn.enabled = true;
                   btnAlert_btn.enabled = true;
                   btnIT_mc.visible = false;
                   btnIT_mc.enabled = false;
              }

              • 4. Re: Question on getting back to main timeline in loaded ext. SWF
                ActivEdit Level 1

                Ok, that makes more sense...still not working though. This might help.

                 

                -The loaded .SWF is 2 scenes

                     -Scene 1 is an .FLV that plays and has a listener attached to a Cue Point that takes it to Scene 2 when the video finishes.

                     -Scene 2 has a 15 frame animation where the button choices animate on from the left of the screen with a stop action on frame 15

                     -At frame 16 of Scene 2 is where the btnHome_mc button appears.

                 

                I've added the script you gave me to Frame 16 at the top and the Remove action to the onRelease event of the button and nothing happens. Any other advice. Sorry!

                • 5. Re: Question on getting back to main timeline in loaded ext. SWF
                  kglad Adobe Community Professional & MVP

                  have you defined path correctly?  if so, what is path and what does the following reveal:

                   


                   

                  // in your loaded swf's main timeline

                   

                  function removeThisF(){

                  trace(this+" "+this._parent);

                  this.swapDepths(this._parent.getNextHighestDepth());

                  this.removeMovieClip();

                  }

                   


                   

                   

                  //------------------Buttons

                  btnHome_mc.onRelease = function () {

                  trace(this);
                       path.removeThisF();  // where path is the path to removeThisF();

                  // all the code below is meaningless because none of those will exist after the above line executes.

                       btnSQL_btn.enabled = true;
                       btnDyna_btn.enabled = true;
                       btnAlert_btn.enabled = true;
                       btnIT_mc.visible = false;
                       btnIT_mc.enabled = false;
                  }

                  • 6. Re: Question on getting back to main timeline in loaded ext. SWF
                    ActivEdit Level 1

                    When I press the button I'm getting the following in the output window...._level0.btnHome_mc

                    • 7. Re: Question on getting back to main timeline in loaded ext. SWF
                      kglad Adobe Community Professional & MVP

                      i thought your button was in your loaded swf?

                      • 8. Re: Question on getting back to main timeline in loaded ext. SWF
                        ActivEdit Level 1

                        It is...I'm loading a swf called IT.swf into myLoader in my Full Project.FLA. The home button is in the IT.swf file.

                        • 9. Re: Question on getting back to main timeline in loaded ext. SWF
                          ActivEdit Level 1

                          Sorry, that was before I loaded it into the Full Project.FLA...when I click the button, once it's loaded I get.

                           

                          _level0.myLoader.btnHome_mc

                          • 10. Re: Question on getting back to main timeline in loaded ext. SWF
                            kglad Adobe Community Professional & MVP

                            then btnHome_mc is on the main timeline of your loaded swf and your using no path to that function, correct?

                             

                            if you don't understand, copy and paste your latest btnHome_mc code.

                            • 11. Re: Question on getting back to main timeline in loaded ext. SWF
                              ActivEdit Level 1

                              Can you tell me what you mean by main timeline? btnHome_mc is on frame 16 of Scene 2 of the IT.swf file which is the file I want to load into my Full Project.FLA file. I want the home button to take me to "Main",1 in the Full Project file.

                               

                              here's the code i have in frame 16 of the IT.swf

                               

                              stop();

                              extLoader_mc._visible = false;

                              btnIT_mc._visible = false;

                              function removeThisF(){

                              trace(this+" "+this._parent);

                              this.swapDepths(this._parent.getNextHighestDepth());

                              this.removeMovieClip();

                              }

                               

                               

                              //---------------MovieClipLoader---------------\\


                              var mcLoader:MovieClipLoader = new MovieClipLoader();
                              var myListener:Object = new Object();
                              mcLoader.addListener(myListener);

                              myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {
                              extLoader_mc._visible = true;
                              var pctLoaded = Math.round(bytesLoaded/bytesTotal*100);
                              extLoader_mc.extLoaderBar_mc._xscale = pctLoaded;
                              if (bytesLoaded >= bytesTotal) {
                                extLoader_mc._visible = false;
                                btnIT_mc._visible = true;
                              }
                              }
                              //------------------------------------------------------------------------------\\

                              //Buttons\\
                              btnSQL_btn.onRelease = function () {
                              mcLoader.loadClip("SQL.swf",myLoader);
                              btnSQL_btn.enabled = false;
                              btnDyna_btn.enabled = false;
                              btnAlert_btn.enabled = false;
                              }

                              btnDyna_btn.onRelease = function () {
                              mcLoader.loadClip("DynaChange.swf",myLoader);
                              btnSQL_btn.enabled = false;
                              btnDyna_btn.enabled = false;
                              btnAlert_btn.enabled = false;
                              }

                              btnAlert_btn.onRelease = function () {
                              mcLoader.loadClip("Alerts.swf",myLoader);
                              btnSQL_btn.enabled = false;
                              btnDyna_btn.enabled = false;
                              btnAlert_btn.enabled = false;
                              }

                              btnHome_mc.onRollOver = function () {
                              btnHome_mc.gotoAndStop("_over");
                              }

                              btnHome_mc.onRollOut = function () {
                              btnHome_mc.gotoAndStop("_up");
                              }

                              btnHome_mc.onPress = function () {
                              btnHome_mc.gotoAndStop("_down");
                              }

                              btnHome_mc.onRelease = function () {
                              trace(this);
                                   path.removeThisF();
                              }

                              btnIT_mc.onRollOver = function () {
                              btnIT_mc.gotoAndStop("_over");
                              }

                              btnIT_mc.onRollOut = function () {
                              btnIT_mc.gotoAndStop("_up");
                              }

                              btnIT_mc.onPress = function () {
                              btnIT_mc.gotoAndStop("_down");
                              }

                              btnIT_mc.onRelease = function () {
                              mcLoader.unloadClip(myLoader);
                              btnSQL_btn.enabled = true;
                              btnDyna_btn.enabled = true;
                              btnAlert_btn.enabled = true;
                              gotoAndStop("IT_Main",16);
                              btnIT_mc._visible = false;
                              }

                               


                              //------------------------------------------------------------------------------\\

                              • 12. Re: Question on getting back to main timeline in loaded ext. SWF
                                kglad Adobe Community Professional & MVP

                                label the Main,1  frame in your main swf (say with "Main_frame1"), then use:


                                 

                                stop();

                                extLoader_mc._visible = false;

                                btnIT_mc._visible = false;

                                function removeThisF(){

                                this._parent._parent.gotoAndStop("Main_frame1");

                                this.swapDepths(this._parent.getNextHighestDepth());

                                this.removeMovieClip();

                                }

                                 

                                 

                                //---------------MovieClipLoader---------------\\


                                var mcLoader:MovieClipLoader = new MovieClipLoader();
                                var myListener:Object = new Object();
                                mcLoader.addListener(myListener);

                                myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {
                                extLoader_mc._visible = true;
                                var pctLoaded = Math.round(bytesLoaded/bytesTotal*100);
                                extLoader_mc.extLoaderBar_mc._xscale = pctLoaded;
                                if (bytesLoaded >= bytesTotal) {
                                  extLoader_mc._visible = false;
                                  btnIT_mc._visible = true;
                                }
                                }
                                //------------------------------------------------------------------------------ \\

                                //Buttons\\
                                btnSQL_btn.onRelease = function () {
                                mcLoader.loadClip("SQL.swf",myLoader);
                                btnSQL_btn.enabled = false;
                                btnDyna_btn.enabled = false;
                                btnAlert_btn.enabled = false;
                                }

                                btnDyna_btn.onRelease = function () {
                                mcLoader.loadClip("DynaChange.swf",myLoader);
                                btnSQL_btn.enabled = false;
                                btnDyna_btn.enabled = false;
                                btnAlert_btn.enabled = false;
                                }

                                btnAlert_btn.onRelease = function () {
                                mcLoader.loadClip("Alerts.swf",myLoader);
                                btnSQL_btn.enabled = false;
                                btnDyna_btn.enabled = false;
                                btnAlert_btn.enabled = false;
                                }

                                btnHome_mc.onRollOver = function () {
                                btnHome_mc.gotoAndStop("_over");
                                }

                                btnHome_mc.onRollOut = function () {
                                btnHome_mc.gotoAndStop("_up");
                                }

                                btnHome_mc.onPress = function () {
                                btnHome_mc.gotoAndStop("_down");
                                }

                                btnHome_mc.onRelease = function () {
                                removeThisF();
                                }

                                btnIT_mc.onRollOver = function () {
                                btnIT_mc.gotoAndStop("_over");
                                }

                                btnIT_mc.onRollOut = function () {
                                btnIT_mc.gotoAndStop("_up");
                                }

                                btnIT_mc.onPress = function () {
                                btnIT_mc.gotoAndStop("_down");
                                }

                                btnIT_mc.onRelease = function () {
                                mcLoader.unloadClip(myLoader);
                                btnSQL_btn.enabled = true;
                                btnDyna_btn.enabled = true;
                                btnAlert_btn.enabled = true;
                                gotoAndStop("IT_Main",16);
                                btnIT_mc._visible = false;
                                }

                                 


                                //------------------------------------------------------------------------------ \\

                                • 13. Re: Question on getting back to main timeline in loaded ext. SWF
                                  ActivEdit Level 1

                                  Still no dice...I label frame 1 in Full Project Main_frame1 and added the code in the external swf (IT.swf) for the _parent stuff. I'm not getting any errors but the button doesn't seem to work...it's clickable but nothing happens.

                                   

                                  Could the fact that I have a preloader in Scene 1 of the Full Project have anything to do with it?

                                  • 14. Re: Question on getting back to main timeline in loaded ext. SWF
                                    kglad Adobe Community Professional & MVP

                                    what's the following show:

                                     

                                     



                                     

                                    stop();

                                    extLoader_mc._visible = false;

                                    trace("it.swf: "+this);

                                    btnIT_mc._visible = false;

                                    function removeThisF(){

                                    trace(this._parent._parent);

                                    this._parent._parent.gotoAndStop("Main_frame1");

                                    this.swapDepths(this._parent.getNextHighestDepth());

                                    this.removeMovieClip();

                                    }

                                     

                                     

                                    //---------------MovieClipLoader---------------\\


                                    var mcLoader:MovieClipLoader = new MovieClipLoader();
                                    var myListener:Object = new Object();
                                    mcLoader.addListener(myListener);

                                    myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {
                                    extLoader_mc._visible = true;
                                    var pctLoaded = Math.round(bytesLoaded/bytesTotal*100);
                                    extLoader_mc.extLoaderBar_mc._xscale = pctLoaded;
                                    if (bytesLoaded >= bytesTotal) {
                                      extLoader_mc._visible = false;
                                      btnIT_mc._visible = true;
                                    }
                                    }
                                    //------------------------------------------------------------------------------ \\

                                    //Buttons\\
                                    btnSQL_btn.onRelease = function () {
                                    mcLoader.loadClip("SQL.swf",myLoader);
                                    btnSQL_btn.enabled = false;
                                    btnDyna_btn.enabled = false;
                                    btnAlert_btn.enabled = false;
                                    }

                                    btnDyna_btn.onRelease = function () {
                                    mcLoader.loadClip("DynaChange.swf",myLoader);
                                    btnSQL_btn.enabled = false;
                                    btnDyna_btn.enabled = false;
                                    btnAlert_btn.enabled = false;
                                    }

                                    btnAlert_btn.onRelease = function () {
                                    mcLoader.loadClip("Alerts.swf",myLoader);
                                    btnSQL_btn.enabled = false;
                                    btnDyna_btn.enabled = false;
                                    btnAlert_btn.enabled = false;
                                    }

                                    btnHome_mc.onRollOver = function () {
                                    btnHome_mc.gotoAndStop("_over");
                                    }

                                    btnHome_mc.onRollOut = function () {
                                    btnHome_mc.gotoAndStop("_up");
                                    }

                                    btnHome_mc.onPress = function () {
                                    btnHome_mc.gotoAndStop("_down");
                                    }

                                    trace("btnHome "+this);

                                    btnHome_mc.onRelease = function () {

                                    trace("onrelease "+this);
                                    removeThisF();

                                    }

                                    btnIT_mc.onRollOver = function () {
                                    btnIT_mc.gotoAndStop("_over");
                                    }

                                    btnIT_mc.onRollOut = function () {
                                    btnIT_mc.gotoAndStop("_up");
                                    }

                                    btnIT_mc.onPress = function () {
                                    btnIT_mc.gotoAndStop("_down");
                                    }

                                    btnIT_mc.onRelease = function () {
                                    mcLoader.unloadClip(myLoader);
                                    btnSQL_btn.enabled = true;
                                    btnDyna_btn.enabled = true;
                                    btnAlert_btn.enabled = true;
                                    gotoAndStop("IT_Main",16);
                                    btnIT_mc._visible = false;
                                    }

                                     


                                    //------------------------------------------------------------------------------ \\

                                    • 15. Re: Question on getting back to main timeline in loaded ext. SWF
                                      ActivEdit Level 1

                                      When the IT.swf 15 frame animation completes I get:

                                      it.swf: _level0.myLoader
                                      btnHome _level0.myLoader

                                       

                                      When I press the button I get:

                                      onrelease _level0.myLoader.btnHome_mc
                                      undefined

                                      • 16. Re: Question on getting back to main timeline in loaded ext. SWF
                                        kglad Adobe Community Professional & MVP

                                        use:

                                         


                                         



                                         

                                        stop();

                                        extLoader_mc._visible = false;


                                        btnIT_mc._visible = false;

                                        function removeThisF(){

                                        trace(this._parent.getNextHighestDepth())

                                        this._parent.gotoAndStop("Main_frame1");

                                        this.swapDepths(this._parent.getNextHighestDepth());

                                        this.removeMovieClip();

                                        }

                                         

                                         

                                        //---------------MovieClipLoader---------------\\


                                        var mcLoader:MovieClipLoader = new MovieClipLoader();
                                        var myListener:Object = new Object();
                                        mcLoader.addListener(myListener);

                                        myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {
                                        extLoader_mc._visible = true;
                                        var pctLoaded = Math.round(bytesLoaded/bytesTotal*100);
                                        extLoader_mc.extLoaderBar_mc._xscale = pctLoaded;
                                        if (bytesLoaded >= bytesTotal) {
                                          extLoader_mc._visible = false;
                                          btnIT_mc._visible = true;
                                        }
                                        }
                                        //------------------------------------------------------------------------------ \\

                                        //Buttons\\
                                        btnSQL_btn.onRelease = function () {
                                        mcLoader.loadClip("SQL.swf",myLoader);
                                        btnSQL_btn.enabled = false;
                                        btnDyna_btn.enabled = false;
                                        btnAlert_btn.enabled = false;
                                        }

                                        btnDyna_btn.onRelease = function () {
                                        mcLoader.loadClip("DynaChange.swf",myLoader);
                                        btnSQL_btn.enabled = false;
                                        btnDyna_btn.enabled = false;
                                        btnAlert_btn.enabled = false;
                                        }

                                        btnAlert_btn.onRelease = function () {
                                        mcLoader.loadClip("Alerts.swf",myLoader);
                                        btnSQL_btn.enabled = false;
                                        btnDyna_btn.enabled = false;
                                        btnAlert_btn.enabled = false;
                                        }

                                        btnHome_mc.onRollOver = function () {
                                        btnHome_mc.gotoAndStop("_over");
                                        }

                                        btnHome_mc.onRollOut = function () {
                                        btnHome_mc.gotoAndStop("_up");
                                        }

                                        btnHome_mc.onPress = function () {
                                        btnHome_mc.gotoAndStop("_down");
                                        }


                                        btnHome_mc.onRelease = function () {


                                        removeThisF();

                                        }

                                        btnIT_mc.onRollOver = function () {
                                        btnIT_mc.gotoAndStop("_over");
                                        }

                                        btnIT_mc.onRollOut = function () {
                                        btnIT_mc.gotoAndStop("_up");
                                        }

                                        btnIT_mc.onPress = function () {
                                        btnIT_mc.gotoAndStop("_down");
                                        }

                                        btnIT_mc.onRelease = function () {
                                        mcLoader.unloadClip(myLoader);
                                        btnSQL_btn.enabled = true;
                                        btnDyna_btn.enabled = true;
                                        btnAlert_btn.enabled = true;
                                        gotoAndStop("IT_Main",16);
                                        btnIT_mc._visible = false;
                                        }

                                         


                                        //------------------------------------------------------------------------------ \\

                                        • 17. Re: Question on getting back to main timeline in loaded ext. SWF
                                          ActivEdit Level 1

                                          Now I'm really confused...here's what I got after clicking the home button:

                                          1048576

                                           

                                          and on subsequent clicks the number goes up by 1...1048577, 1048578, 1048579, etc..

                                          • 18. Re: Question on getting back to main timeline in loaded ext. SWF
                                            kglad Adobe Community Professional & MVP

                                            so, you must be using a component in your main swf that's causing a problem.  use:

                                             


                                             


                                             



                                             

                                            stop();

                                            extLoader_mc._visible = false;


                                            btnIT_mc._visible = false;

                                            function removeThisF(){


                                            this._parent.gotoAndStop("Main_frame1");

                                            this.swapDepths(1000000);  // <-- if you have anyting at depth 1000000 this will cause a problem

                                            this.removeMovieClip();

                                            }

                                             

                                             

                                            //---------------MovieClipLoader---------------\\


                                            var mcLoader:MovieClipLoader = new MovieClipLoader();
                                            var myListener:Object = new Object();
                                            mcLoader.addListener(myListener);

                                            myListener.onLoadProgress = function(target_mc,bytesLoaded,bytesTotal) {
                                            extLoader_mc._visible = true;
                                            var pctLoaded = Math.round(bytesLoaded/bytesTotal*100);
                                            extLoader_mc.extLoaderBar_mc._xscale = pctLoaded;
                                            if (bytesLoaded >= bytesTotal) {
                                              extLoader_mc._visible = false;
                                              btnIT_mc._visible = true;
                                            }
                                            }
                                            //------------------------------------------------------------------------------ \\

                                            //Buttons\\
                                            btnSQL_btn.onRelease = function () {
                                            mcLoader.loadClip("SQL.swf",myLoader);
                                            btnSQL_btn.enabled = false;
                                            btnDyna_btn.enabled = false;
                                            btnAlert_btn.enabled = false;
                                            }

                                            btnDyna_btn.onRelease = function () {
                                            mcLoader.loadClip("DynaChange.swf",myLoader);
                                            btnSQL_btn.enabled = false;
                                            btnDyna_btn.enabled = false;
                                            btnAlert_btn.enabled = false;
                                            }

                                            btnAlert_btn.onRelease = function () {
                                            mcLoader.loadClip("Alerts.swf",myLoader);
                                            btnSQL_btn.enabled = false;
                                            btnDyna_btn.enabled = false;
                                            btnAlert_btn.enabled = false;
                                            }

                                            btnHome_mc.onRollOver = function () {
                                            btnHome_mc.gotoAndStop("_over");
                                            }

                                            btnHome_mc.onRollOut = function () {
                                            btnHome_mc.gotoAndStop("_up");
                                            }

                                            btnHome_mc.onPress = function () {
                                            btnHome_mc.gotoAndStop("_down");
                                            }


                                            btnHome_mc.onRelease = function () {


                                            removeThisF();

                                            }

                                            btnIT_mc.onRollOver = function () {
                                            btnIT_mc.gotoAndStop("_over");
                                            }

                                            btnIT_mc.onRollOut = function () {
                                            btnIT_mc.gotoAndStop("_up");
                                            }

                                            btnIT_mc.onPress = function () {
                                            btnIT_mc.gotoAndStop("_down");
                                            }

                                            btnIT_mc.onRelease = function () {
                                            mcLoader.unloadClip(myLoader);
                                            btnSQL_btn.enabled = true;
                                            btnDyna_btn.enabled = true;
                                            btnAlert_btn.enabled = true;
                                            gotoAndStop("IT_Main",16);
                                            btnIT_mc._visible = false;
                                            }

                                             


                                            //------------------------------------------------------------------------------ \\

                                            1 person found this helpful
                                            • 19. Re: Question on getting back to main timeline in loaded ext. SWF
                                              ActivEdit Level 1

                                              OK, now we're getting somewhere. That takes me back to the main screen, but with the go to and Stop, my buttons on the Main screen are no longer visible. I tried gotoAndPlay and that got the buttons to be visible and work again but there's a blip (flash frame) when the home button is initially pushed.

                                               

                                              What do you mean a problem with a component in the main .SWF? Something with the loader or movie clip loader? I appreciate all of your help!!!!

                                              • 20. Re: Question on getting back to main timeline in loaded ext. SWF
                                                kglad Adobe Community Professional & MVP

                                                what do you mean by a "blip"?  there's some visual artifact?

                                                 

                                                some components automatically place themselves at the greatest removable depth (2**20).  that causes a problem when getNextHighestDepth() is used because the next highest depth after the largest removable depth, is a non-removable depth.  so, i had to remove that method and take a guess at an unused removable depth that could be used.  if your target movieclip (i think it was _level0.loader) as already at a removable depth (0 to 2**20 ) there's no need to swap depths, at all.

                                                • 21. Re: Question on getting back to main timeline in loaded ext. SWF
                                                  ActivEdit Level 1

                                                  The blip I can only describe as a camera shutter closing and opening to reveal the original main screen when I use gotoAndPlay. If I use gotoAndStop, the buttons are no longer functional but there's an instant change from the "room" screen (IT.swf) to the Main screen. Any idea what that might be? Thanks!

                                                  • 22. Re: Question on getting back to main timeline in loaded ext. SWF
                                                    kglad Adobe Community Professional & MVP

                                                    when you use gotoAndPlay() the timeline is going to a frame and then advancing until it reaches a stop().   label the frame (say stopframe) that contains that stop() and use gotoAndStop(stopframe)

                                                    • 23. Re: Question on getting back to main timeline in loaded ext. SWF
                                                      ActivEdit Level 1

                                                      There is no animation at all in the Main screen...everything is in frame 1. I had frame 1 labeled "Main_frame1" like you told me to...changing that to "stopframe" and then concurrently changing the code wouldn't make any difference would it? Thx!

                                                      • 24. Re: Question on getting back to main timeline in loaded ext. SWF
                                                        ActivEdit Level 1

                                                        It also doesn't seem like the gotoAndStop has anything to do with it b/c it still goes to the main screen if I remove that line of code...buttons on the main screen are still not working.

                                                        • 25. Re: Question on getting back to main timeline in loaded ext. SWF
                                                          ActivEdit Level 1

                                                          OK, I think a better way to do this might be to put the Home button in the Main Project File rather than the loaded external .swf (IT.swf). That way I could just unload the external swf from myLoader to take me back to the initial Main screen. The only issue is that I want the button to show up after the loaded external .swf gets to frame 16. Is that a possiblility through a listener?

                                                          • 26. Re: Question on getting back to main timeline in loaded ext. SWF
                                                            kglad Adobe Community Professional & MVP

                                                            from frame 16 of your loaded swf, call a function in your loading swf that does what you want.

                                                            • 27. Re: Question on getting back to main timeline in loaded ext. SWF
                                                              ActivEdit Level 1

                                                              Sorry that I'm such a schlep! I understand what you're saying but don't know how to build or call a function.

                                                              • 28. Re: Question on getting back to main timeline in loaded ext. SWF
                                                                ActivEdit Level 1

                                                                OK, kglad, thanks!!!! I figured out how to do it...for anyone wanting to know, here's the script

                                                                 

                                                                function setButtonToVisible ():Void {
                                                                     YourButtonName._visible = true;
                                                                }

                                                                 

                                                                //then on frame 16 of the loading .swf

                                                                 

                                                                _root.setButtonToVisible();