2 Replies Latest reply on Jul 19, 2006 4:06 PM by Newsgroup_User

    position of instance after loadMovie

    fbcojman Level 1
      in an effort to keep my file size down i am utilizing the loadMovie function for areas with large file sizes, however, i am runnign into problems with the positioning of the loaded movie. I am able to move the button of the movie clip so that the button is in the top left corner of what i where i would like the movie to be. That is not working, it is still trying to center the movie on the screen. Any help?
        • 1. Re: position of instance after loadMovie
          coreysyms
          you can manipulate loaded movies via the _level property.

          for instance.

          this.loadMovieNum("my_movie.swf", 1); // loading a movie into _level1

          now i can target the level.

          _level1._x = 50;
          _level1._y = 50;

          or even clips inside that movie.

          _level1.myMovieClip._x = 50;

          whatever you want.

          BUT the clip has to be completly loaded before flash can target it. so use preloaders to be safe.

          cheers,
          corey
          • 2. Re: position of instance after loadMovie
            Level 7


            coreysyms wrote:
            > you can manipulate loaded movies via the _level property.
            >
            > for instance.
            >
            > this.loadMovieNum("my_movie.swf", 1); // loading a movie into _level1
            >
            > now i can target the level.
            >
            > _level1._x = 50;
            > _level1._y = 50;
            >
            > or even clips inside that movie.
            >
            > _level1.myMovieClip._x = 50;
            >
            > whatever you want.
            >
            > BUT the clip has to be completly loaded before flash can target it. so use
            > preloaders to be safe.
            >
            > cheers,
            > corey

            so, to avoid the wait and executing action prematurely, all you need to do
            is place this._x=50; and this._y=50; on the first frame of the loaded movie.
            It will position itself automatically while loading.

            --
            Regards

            Urami


            --



            Happy New Year guys - all the best there is in the 2006 :)




            <urami>
            http://www.Flashfugitive.com
            </urami>

            <web junk free>
            http://www.firefox.com
            </web junk free>