PDA

View Full Version : Homepage fade out if statement


buildingbrick
07-30-2010, 03:52 PM
I want the homepage to fade out and go to the correct page.

The question is do I have to add an if statement to all main buttons to detect if the page is on the homepage?

Example:

top_left_logo.addEventListener(MouseEvent.CLICK, goBand);

function goBand(event:MouseEvent):void {
event.currentTarget.gotoAndPlay("down"); <= (button down animation)
if(currentFrame = "home") {
main_photo.gotoAndPlay("fadeout");
}
gotoAndStop("band");
}

Thanks in advance!