A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Running function of a loaded movie

  1. #1
    Member
    Join Date
    Oct 2006
    Posts
    45

    Running function of a loaded movie

    Hello all,
    I've got a parent movie that's loading external swf's into 7 container movieclips using the loadMovie() function. That's all good. I need to, however, have external images loaded into additional container movieclips INSIDE those swf's upon them being completely loaded into the parent movie. I know how to reference a movieclip loaded into a level, but if you're loading an swf into a container movieclip, how do you attribute an instance name to it for later referencing? It seems to me that loadMovie() doesn't have this quality.

    Insight?

  2. #2
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    you reference the container movieclips instance name so if you loaded your swf into an mc with an instance name of 'container' that container would be your swf

    container.gotoAndStop(5); would go to frame 5 of the loaded swf

    hope that's what your after!
    Evolve Designs Interactive Media
    the natural selection

  3. #3
    Member
    Join Date
    Oct 2006
    Posts
    45
    I understand that part. What I can't seem to figure out is HOW you attribute an instance name with loadMovie(). The provided parameters don't have an instance name portion...
    Code:
    //LOAD THE MOViE "myMovie.swf" INTO THE MOVIECLIP "movieHolder" ON THE _root
    loadMovie("myMovie.swf", "_root.movieHolder");
    The online documentation for Flash 8 on Adobe's website doesn't say anything about attributing an instance name. Am I missing something?
    Last edited by oskom; 02-28-2008 at 06:01 PM.

  4. #4
    Member
    Join Date
    Oct 2006
    Posts
    45
    HOLD UP! Ryan, I finally read your answer a little more carefully. I reference the CONTAINER MOVIE, not the SWF itself...gotcha!!!

    Thanks!

  5. #5
    Ryan Thomson EvolveDesigns's Avatar
    Join Date
    Oct 2001
    Location
    British Columbia
    Posts
    3,338
    u bet!
    Evolve Designs Interactive Media
    the natural selection

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center