3 Replies Latest reply on Jan 19, 2007 6:38 PM by Newsgroup_User

    Positioning Movieclip

    Roger_@_Fence_Check
      Hello,

      I'm a complete n00b, so please bare with me.

      I am doing this:
      loadMovieNum("splash.swf", 1);

      Now, I'd like to have that movie played on a different position than the default. I'd like it to move 200pixels up (_y = -200 ?).

      Any idea how I might be able to do this? I do not have the source fla file for the splash.swf, but the client wants to reuse it in the new site, so I thought it would be the easiest solution to load it into a new flash movie and reposition it.

      Thanks for your time.

      Roger
        • 1. Re: Positioning Movieclip
          Level 7
          Roger,

          > I'm a complete n00b, so please bare with me.

          Sure thing. :)

          > I am doing this:
          > loadMovieNum("splash.swf", 1);

          Okay.

          > Now, I'd like to have that movie played on a different
          > position than the default. I'd like it to move 200pixels
          > up (_y = -200 ?).

          Sure. Loaded SWFs are functionally the same as MovieClip symbols, so
          once the SWF has been loaded, and you know loading is complete, simply
          reference that object and manipulate whatever properties you'd like,
          including MovieClip._y. (Hint: Objects are defined by their [usually]
          namesake classes, so since you're dealing with movie clips, look up the
          MovieClip class to find out all of its properties [characteristics], methods
          [things it can do], and events [things it can react to].)

          Now, how do you make sure your SWF is loaded? There are a handful of
          ways. See if this article for a few ideas.

          http://www.quip.net/blog/2006/flash/how-to-tell-when-external-swf-loaded

          Look up your choices for loading. The loadMovieNum() function is an
          older one than some of the new (relatively speaking) MovieClip methods. In
          any case, the easiest thing may simply be to load your SWF into an empty
          movie clip symbol, rather than a level. That way, you don't have to move
          anything ... just position that movie clip where you like, and the SWF will
          consider that location its upper left corner.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Positioning Movieclip
            Roger_@_Fence_Check Level 1
            Mmmm, so I have to wait till it's fully loaded? Like I said, I have no idea how this works or how to code this. Any help is appreciated.

            Thanks,
            Roger
            • 3. Re: Positioning Movieclip
              Level 7
              Roger,

              > Mmmm, so I have to wait till it's fully loaded?

              Yes. Until an external SWF is fully loaded, you can't act on it.

              > Like I said, I have no idea how this works or how to
              > code this. Any help is appreciated.

              I suggested a URL in the last reply with two approaches. Did that not
              make it, somehow?


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."