17 Replies Latest reply on Sep 4, 2007 7:32 PM by kglad

    load movie

    chrispilie
      I have a swf called "Acrylics" that loads another swf called "AcrylicsRiverside" with the push of a button using this code:

      on (release) {
      _root.Floor10.loadMovie("AcrylicsRiverside.swf");

      }

      Within the AcrylicsRiverside.swf there is a set of buttons. These buttons have code like this:


      on (rollOver) {
      tellTarget ("/rollover") {
      gotoAndPlay ("1text");
      }
      }
      on (rollOut) {
      tellTarget ("/rollover") {
      gotoAndPlay ("1back");
      }
      }

      "rollover" is the instance name of a movie clip called "movie_actions". When I rollover the buttons there is no actions. Anyone have an explanation? I will eventually load the "Acrylics.swf" into another called "Home.swf" when a button on Home.swf is pressed. Any help is much welcome.
        • 1. Re: load movie
          kglad Adobe Community Professional & MVP
          try adding the following to the first frame of the main timeline in AcrylicsRiverside.fla:

          this._lockroot = true;
          • 2. load movie
            chrispilie Level 1
            I appreciate the advice but it didn't work. I am thinking it is a directory structure issue with the tellTarget action script.

            tellTarget ("/rollover")

            I am not getting any button rollover actions either
            • 3. Re: load movie
              kglad Adobe Community Professional & MVP
              is rollover on the _root timeline of AcrylicsRiverside.swf? if so, change those tellTarget() statements to

              • 4. Re: load movie
                chrispilie Level 1
                It still does the same thing. Scratching head... Keep in mind that the Acrylics.swf loads the AcrylicsRiverside.swf within it.
                • 5. Re: load movie
                  kglad Adobe Community Professional & MVP
                  then rollover is not on the main timeline of the loaded swf or you didn't enable _lockroot in the loaded swf.
                  • 6. Re: load movie
                    chrispilie Level 1
                    Ok this is the code that I have in the buttons now

                    on (release) {
                    tellTarget ("/rollover") {
                    _root.rollover.gotoAndPlay("2text");
                    }
                    }
                    on (rollOver) {
                    tellTarget ("/rollover") {
                    _root.rollover.gotoAndPlay("2text"););
                    }
                    }
                    on (rollOut) {
                    tellTarget ("/rollover") {
                    _root.rollover.gotoAndPlay("2text");
                    }
                    }

                    I am getting an error when rolling over the button of

                    Target not found: Target="/rollover" Base="_level0.Floor10"

                    The rollover is on the main timeline of AcryilicsRiverside.swf and and the
                    this._lockroot = true;
                    is in the same timeline.
                    • 7. Re: load movie
                      kglad Adobe Community Professional & MVP
                      remove the tellTarget code.
                      • 8. Re: load movie
                        chrispilie Level 1
                        I appreciate your patience. Ok the error went away but still no goto actions. The rollover features of the buttons are working but there is no images coming up on rollover in the Floor10 instance within the AcrylicsRiverside.swf after it is loaded onto the stage of Acrylics. The frames that the buttons point to (2text, 2back) are within a movie clip called "movie_actions" within the AcrylicsRiverside.swf which is on that main timeline. The actions are playing when I test AcryiicsRiverside swf by itself. When I load AcrylicsRiverside.swf onto Acrylics, the buttons come up and I see the rollover button features just no goto actions.
                        • 9. Re: load movie
                          kglad Adobe Community Professional & MVP
                          that doesn't make sense. if movie_actions is the name of the movieclip that you want to control _root.rollover.gotoAndPlay(whatever) wouldn't work (to control movie_actions).
                          • 10. Re: load movie
                            chrispilie Level 1
                            The instance name is "rollover" of the movie clip named "movie_actions". When I changed the code to:

                            on (rollOver) {
                            _root.movie_actions.gotoAndPlay("2text");

                            }

                            AcrylicsRiverside.swf will not work under a test.
                            • 11. Re: load movie
                              kglad Adobe Community Professional & MVP
                              the library name is irrelevant. the instance name is key.

                              so the following should work when loaded and when running on its own when not loaded into another swf:



                              • 12. Re: load movie
                                chrispilie Level 1
                                This is the code I have on the first button

                                on (release) {
                                _root.rollover.gotoAndPlay("2text");

                                }
                                on (rollOver) {
                                _root.rollover.gotoAndPlay("2text");

                                }

                                I have 2 layers with one frame on the main timeline. One is buttons where the buttons reside. I also have an actions layer where the action

                                this._lockroot=true;

                                resides along with the movie clip (instance name: "rollover") When I test this SWF with the the code above. All the buttons work as they are supposed to. When I load the swf into another the buttons appear and react to the rollover button feature but do not display the image and annimation from 2text of the movie_actions (instance "rollover") timeline. I could send it if you wanted to take a look.
                                • 13. Re: load movie
                                  kglad Adobe Community Professional & MVP
                                  post a link to a zipped file containing your two flas.
                                  • 14. Re: load movie
                                    chrispilie Level 1
                                    I sent the links to your private message box. Inside the Acrylics.swf, the "Mandala Series" button calls the AcrylicsGeneral.swf to the floor10 instance. Disregard the Riverside Series button and the Spiritual Series button as well. They are inoperable right now. Let me know if you have any questions. I appreciate your help.
                                    • 15. Re: load movie
                                      kglad Adobe Community Professional & MVP
                                      the problem is you're publishing acrylicsgeneral.swf for flashplayer 5. you must use flash player 7 or better for _lockroot.

                                      if acrylicsgeneral.swf must be published for fp5, use:

                                      Floor10._lockroot = true;

                                      in acrylics.fla
                                      • 16. Re: load movie
                                        chrispilie Level 1
                                        AMEN!!! That did the trick. THANKS!!!
                                        • 17. Re: load movie
                                          kglad Adobe Community Professional & MVP
                                          you're welcome.