3 Replies Latest reply on May 24, 2006 1:29 PM by Rothrock

    Loadmovie

    Level 7
      Hello

      why when i use

      this.clip.loadMovie("dessin.swf"); all my button is not ok
      this.loadMovie("dessin.swf"); all my button is ok

      but if i dont put clip. I cant use progress bar

      thank you for your help


        • 1. Re: Loadmovie
          Rothrock Level 5
          My guess would be that the code in dessin.swf uses things like _root to refer to things. So for example in dessin.swf if you have this code:

          _root.myButton.onRelease=function(){
          //do something
          }

          It would work because the button called myButton is on the _root (main timeline). But when you load dessin.swf into this.clip, the myButton is not on the main timeline anymore. it is _root.clip.myButton.

          To avoid this you can try the easy way out and use lockroot. I don't know how it works and I don't recommend this approach.

          Instead, learn to write code that doesn't include _root. Instead use "this" and "_parent" to refer to instances with relative, not absolute paths.
          • 2. Re: Loadmovie
            Level 7
            thank you I do THIS
            Thank you very much

            "Rothrock" <webforumsuser@macromedia.com> a �crit dans le message de news:
            e503h0$jh0$1@forums.macromedia.com...
            > My guess would be that the code in dessin.swf uses things like _root to
            > refer
            > to things. So for example in dessin.swf if you have this code:
            >
            > _root.myButton.onRelease=function(){
            > //do something
            > }
            >
            > It would work because the button called myButton is on the _root (main
            > timeline). But when you load dessin.swf into this.clip, the myButton is
            > not on
            > the main timeline anymore. it is _root.clip.myButton.
            >
            > To avoid this you can try the easy way out and use lockroot. I don't know
            > how
            > it works and I don't recommend this approach.
            >
            > Instead, learn to write code that doesn't include _root. Instead use
            > "this"
            > and "_parent" to refer to instances with relative, not absolute paths.
            >


            • 3. Re: Loadmovie
              Rothrock Level 5
              Well glad to have helped.

              But don't do THIS

              do this

              Capitalization matters!