mlabre51
12-27-2010, 08:20 PM
I working through a Flash game design book and one thing is not working correctly and I am not sure how to fix it. I am working through the creation of what is basically an interactive storybook. The problem I am having is that if I am on page 1 of the storybook, and I click the button to go to page 2, and then click the button to go back to page 1, the button state remains in the 'over' state. I downloaded the source code for the book and the problem also exists there, so it is not simply a problem with my code. I am just wondering how to fix it. Here is the code that the book has me use for the buttons
code for page 1 button:
function onHillButtonClick(event:MouseEvent):void
{
addChild(hillPage);
removeChild(startPage);
}
code for page 2 button:
function onBackButtonClick_Hill(event:MouseEvent):void
{
addChild(startPage);
removeChild(hillPage);
}
How can I reset the button state so that when I go back to page 1, the button is in the 'up' state, rather than the 'over' state?
Thanks
code for page 1 button:
function onHillButtonClick(event:MouseEvent):void
{
addChild(hillPage);
removeChild(startPage);
}
code for page 2 button:
function onBackButtonClick_Hill(event:MouseEvent):void
{
addChild(startPage);
removeChild(hillPage);
}
How can I reset the button state so that when I go back to page 1, the button is in the 'up' state, rather than the 'over' state?
Thanks