dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: setMask and duplicateMovieClip

  1. #1
    Senior Member
    Join Date
    Jun 2001
    Posts
    250

    setMask and duplicateMovieClip

    Hello,

    I'm trying to use the setMask Method to mask a image(line).
    setMask will work if my image lines are manually placed on the stage. However, my lines are generated using the duplicateMovieclip Method.

    Is there a way to make dynamically generated images usign setMask


    Thank You

    onEnterFrame = fdup;
    function fdup(){
    var space = 2;
    for(i=0; i<=20; i++){
    maskmc.duplicateMovieClip("image"+ i,i);
    _root["image"+i]._y+=i*space;
    //---end dup

    //---start mask

    iline.setMask("themask");
    }
    }

  2. #2
    Senior Member
    Join Date
    Jun 2001
    Posts
    250
    Edited the code for correction.

    onEnterFrame = fdup;
    function fdup(){
    var space = 2;
    for(i=0; i<=20; i++){
    maskmc.duplicateMovieClip("myimage_mc"+ i,i);
    _root["image"+i]._y+=i*space;
    //---end dup

    //---start mask

    maskmc.setMask("myimage_mc");
    }
    }

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