dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: duplicateMovieClip - need little help!

  1. #1
    hi people! i got a small actionscript problem. i think i need the dublicatemovieclip (what a word! ) but i don't understand it:

    duplicateMovieClip ("TARGET", "NEWNAME", DEPTH);

    i think the target is the movie to dublicate, and the new name is...the name of the dublicatet movie , but what the hell is depth??
    if i dublicated the mc can i set any properties too?
    thx for answers

  2. #2
    Member
    Join Date
    Oct 2001
    Posts
    44

    Cow Icon

    You are quite right with the names, and here is a little explanation about DEPTH (it`s similar to z-index in DHTML):

    The depth level is the stacking order that determines how movie clips and other objects appear when they overlap. The first movie clip that your create, or instance that you drag onto the Stage, is assigned a depth of level 0. You must assign each successive or duplicated movie clip a different depth level to prevent it from replacing movies on occupied levels or the original movie clip.

    for example:
    duplicateMovieClip("movie_clip","movie_clip_new",1 0);
    duplicateMovieClip("movie_clip1","movie_clip_new1, 11);

    so movie_clip_new is "below" the movie_clip_new1...

    Second question:
    Of course you can... for example:

    duplicateMovieClip("movie_clip","movie_clip_new",1 0);
    with("movie_clip_new"){
    _x=100;
    _y=150;
    _alpha=50;
    .......
    }
    or use
    setProperty("movie_clip_new", _alpha, 95);

    I hope this will help...

    ZeroIQ


  3. #3
    ok thx now i'm ready for some actionscript
    information helped very much!

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