A Flash Developer Resource Site

+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    5

    Levels - using attachMovie()

    I'm trying to use attachMovie to load a movie on top of an external swf movie that I load with a loadMovieNum. I use the following script:

    on (release) {
    _root.attachMovie("popupList", "ipopupList", 2);
    }

    The external swf is loaded with this script:

    loadMovie("media/hulls.swf", 1);

    No matter what level number I use to attach the movie, is shows up behind the external swf. I'm trying to load it on top.

    I'm totally lost.
    Any help would be greatly appreciated.

  2. #2
    Moderator nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi,

    Everything that is on the _root (_level0) is under content on other levels.

    If you attach you movie clip to the _root, what you've got on _level1, is on top of it.

    Attach it to _level1 instead:
    code:

    _level1.attachMovie("popupList", "ipopupList", 2);


    after _level1 exists, i.e., after loading the movie into _level1.

    Read MX Dephs Explained on top of this forum.

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Posts
    5
    For some reason, the only way the attachMovie works is if I use _root or _level0. If I use _level 1, the movie doesn't load.

  4. #4
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    You can only attach a movie clip on _root or _level0, which is the same as _root.

  5. #5
    Junior Member
    Join Date
    Jan 2003
    Posts
    5
    Thanks, that explains it.
    Is there a way to assign an instance name to an external swf that is loaded with loadMovieNum?

  6. #6
    Banned
    Join Date
    Apr 2001
    Location
    Montréal, Québec.
    Posts
    25,397
    Possibly through the use of a shared library.

  7. #7
    Moderator nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    I missed a detail:
    The movie clip you want to attach, has to be avaiable for that purpose, in the movie that will be loaded into a chosen level or movie clip.

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