Corona Sdk: Storyboard API and Object Alpha (Opacity)

I posted this on StackOverflow already, without being answered. I am having troubles changing an object alpha in a storyboard corona application.

When the page is loaded, the object has a default alpha of 0 (it is invisible). Then, by clicking on a button, his alpha is set to 1 (it becomes visible).

If i leave the page, move to another storyboard page, and then get back, the object is still visible, even though i set his alpha back to 0 again with this code both in the function that gets me back to other pages:

local function gotoHomefun()  
if objectname then  
objectname.alpha = 0  
end  
storyboard.gotoScene( "home", "crossFade", 400 )  
return true  
end  

and in the destroyScene event:

function scene:destroyScene( event )  
local group = self.view  
if objectname then  
objectname.alpha = 0  
objectname :removeSelf()   
objectname = nil  
end  
display.remove( group )  
group = nil   
end  
I really don't know if im doing something wrong, or i found a bug.  

Any help would be really appreciated! Thanks!
[import]uid: 203565 topic_id: 33877 reply_id: 333877[/import]

if you are just switching scenes without purging/removing then your destroyScene function really isn’t being called. Try using the exitScene or didExitScene event to handle setting your alpha back to zero.

The template on this page has comments that should help.
http://docs.coronalabs.com/api/library/storyboard/index.html [import]uid: 147305 topic_id: 33877 reply_id: 134655[/import]

Purge scene worked just fine! A big thank you! [import]uid: 203565 topic_id: 33877 reply_id: 134691[/import]

if you are just switching scenes without purging/removing then your destroyScene function really isn’t being called. Try using the exitScene or didExitScene event to handle setting your alpha back to zero.

The template on this page has comments that should help.
http://docs.coronalabs.com/api/library/storyboard/index.html [import]uid: 147305 topic_id: 33877 reply_id: 134655[/import]

Purge scene worked just fine! A big thank you! [import]uid: 203565 topic_id: 33877 reply_id: 134691[/import]