dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Levels & Targets

  1. #1
    Member
    Join Date
    May 2001
    Posts
    34

    resolved

    what are levels , Targets ? and how can place a movie in a level and how can l use the target in loading and unloading ?

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    To load a movie into a level you can use

    loadMovie("movieName.swf",1);

    levels basically pile movies on top of each other, the main movie (the one embeded in your html) is in level0 and you can use loadMovie to load more swf's above the main movie. If you try to load more than one movie into a level the second movie will replace the first one.

    targets allow you to do a similar thing. Do do this create a movie clip and give it an instance name (i'll use holder) place this on the stage. This is your target. you can now load an swf file into this movie clip

    using

    loadMovie("movieName.swf",_root.holder);

    you can unload movies by simply loading nothing where the movie was like this

    loadMovie("",_root.holder);

    would unload the movie in the holder movie clip. You can control the timeline of an swf file loaded into a movie clip in the same way as you'd control the clip itself eg

    _root.holder.gotoAndPlay(2);

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