A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Loading MCs from Library into Empty MC

  1. #1

    Loading MCs from Library into Empty MC

    Hi all,

    I have inherited a file from the previous designer that has alot of separate movie clips that are targeted from a main navigation(buttons) list.

    Is there a way to load the movie clips from the library (i.e. not have them on stage) into an empty "container" movie clip when a user selects its button form the main nav list?

  2. #2
    Hey Timmy!!! walsher's Avatar
    Join Date
    Jan 2005
    Location
    Latrobe, PA
    Posts
    1,899
    Yep, your looking for attachMovie(). What you first need to do is put a linkage name on each mc in the library. You do that by right clicking and select linkage. Then in the pop-up choose the first check box, I believe its export to action script. And you can then rename or keep the name in the linkage name textbox. Then from there your code.

    _root.emptyMCName.attachMovie("linkageName", "newName", this.getNextHighestDepth());

    The newName is how you'll refer to the mc now that it's on the stage.

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