A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: remove dynamic mask?

  1. #1
    Junior Member
    Join Date
    Nov 2006
    Posts
    15

    remove dynamic mask?

    Hi,

    I am trying to use an animated movieclip and create dynamic mask, and everything
    works fine until I want this to happen again. What I mean is if you click on a button,
    and the mask reveals something, but if you click on somewhere else then click on the button again, the mask doesn't work.

    here's my mask code which works fine
    Code:
    var mask1:Mask = new Mask();
    addChild(mask1);
    mask1.cacheAsBitmap = true;
    webcontent.cacheAsBitmap = true;
    webcontent.mask=mask1;
    so i'm thinking that maybe i should remove the mask after the user clicked on
    something else so that the mask will work again somehow?
    Can someone give me some guidance? thanks

  2. #2
    Ө_ө sleepy mod
    Join Date
    Mar 2003
    Location
    Oregon, USA
    Posts
    2,441
    Your mask should be persistent as long as both mask1 and webcontent exist together (keyframes could break it) - how are you changing the content?

  3. #3
    Junior Member
    Join Date
    Nov 2006
    Posts
    15
    hmmm, i'm not sure what do you mean by changing the content, my mask is a movieclip which is animated on the timeline, and the webcontent is the same, so whenever I click the button, it will addChild(webcontent) then call the function which I posted above.... but the second time I click it, I would see the last frame of my mask as a normal movieclip, that's why I thought I should remove it then add it on stage again maybe?? thank you!

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