Jump to content
Search Community

Modifying blitMask target?

bonus test
Moderator Tag

Recommended Posts

First of all, thank you very much for this brilliant job!

I use blitmask as Carl Schooff’s singleDigit.fla example, but I’m using the button to go forward number by number and another button to choose the number user wants. When user choose a number i need to 'disable' this number coloring it in grey for exemple, or modifying its alpha level.


var blitMask1:BlitMask = new BlitMask( strip1, strip1.x, strip1.y, strip1.width, 300, true, true, 0xffff00, true);

//if user choose the number three...
strip1.three.alpha= 0.5; // I want to do that but it doesn't work and I don’t know how to modify or update the target bitmap.

Thank you very much for you help!
Sorry for my poor English..

Link to comment
Share on other sites

Hi and welcome to the GreenSock forums,

 

Yes, once you modify the target of the BlitMask (like changing the alpha of one of its children) you need to update the BlitMask and recapture the pixels of the target.

 

The update() method does this.

 

http://api.greensock.com/as/com/greensock/BlitMask.html#update()

 

In your case you will need to set the forceRecaptureBitmap parameter to true like so:

blitMask1.update(true);
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...