Getting a masked object to fade in and out?

Hi everyone,

I am trying to get a masked object to fade in and out but havent had much luck. It appears that when i set the masked objects alpha to anything above 0 it goes to a full alpha of 1. Any help with this would be great thanks. Here is the code I am using.

Best,
Chris Brasino

[lua]mapLights = display.newImageRect(“images/maps/emap1Lights.png”, 320, 480); – object being masked

mask = graphics.newMask( “images/maps/mask.png” ) – mask
mapLights:setMask( mask )
mapLights.maskScaleX, mapLights.maskScaleY = 10,10

mapLights.alpha = 0; – set the alpha to 0

transition.to(mapLights, {delay = 1000, time = 5000, alpha = 1}) – this should make the map fade in slowly but the instant it becomes active after the delay its alpha goes instantly to 1.
[import]uid: 126017 topic_id: 30709 reply_id: 330709[/import]

You currently cannot mask display objects and have their alpha be anything other than 0 or 1. I have mentioned this to Walter the last time I saw him so hopefully he will be able implement it easily. [import]uid: 8444 topic_id: 30709 reply_id: 123092[/import]

Ok thank you very much that clears up my issue. I found a work around using a black cover over the object I really wanted to mask and then having a break in the black cover where I want to reveal the image underneath. I then can change the images alpha since it is not being the object masked. Thanks for your quick response. [import]uid: 126017 topic_id: 30709 reply_id: 123191[/import]

You currently cannot mask display objects and have their alpha be anything other than 0 or 1. I have mentioned this to Walter the last time I saw him so hopefully he will be able implement it easily. [import]uid: 8444 topic_id: 30709 reply_id: 123092[/import]

Ok thank you very much that clears up my issue. I found a work around using a black cover over the object I really wanted to mask and then having a break in the black cover where I want to reveal the image underneath. I then can change the images alpha since it is not being the object masked. Thanks for your quick response. [import]uid: 126017 topic_id: 30709 reply_id: 123191[/import]