Im making a website for a client and they want a site similar to: http://www.dynamicfactory.com/flash_templates/theatre/theatre.htm
except doors instead of curtains. I already made the door opening/closing animation in flash (frame by frame) but does anyone know a way (actionscript probably) to make the doors open and close every time the view navigates to another page on my site?
the only way I know to do that is by using actionscript. create an animation and tie it into a function and then call that function on the mouseclick of the navigation. I would have just told your client that a flash site is a bad idea. It's doesn't index in google, no one can make changes, and a lot of people viewing the web might not even have flash installed. Good luck though.
public class DoorActions extends UIMovieClip { public function closeDoors(event:MouseEvent):void { gotoAndPlay(where ever the first frame for closing begins); dispatchEvent(new Event(\"close\")); }
public function openDoors(event:MouseEvent):void { dispatchEvent(new Event(\"open\")); gotoAndPlay(where ever the first frame for opening begins); } }
Now, assuming you're making this in Flex, you can add handlers to find out which button was pressed, pass it to the closeDoors handler, let a loader handler wait for a "close" event to occur, display a loading screen (spinning arrows is fine), then dispatch an event to the openDoors function, and then have the said data wait for the open event and do what it wants with it.
except doors instead of curtains. I already made the door opening/closing animation in flash (frame by frame) but does anyone know a way (actionscript probably) to make the doors open and close every time the view navigates to another page on my site?
Thank you so much.
Now, assuming you're making this in Flex, you can add handlers to find out which button was pressed, pass it to the closeDoors handler, let a loader handler wait for a "close" event to occur, display a loading screen (spinning arrows is fine), then dispatch an event to the openDoors function, and then have the said data wait for the open event and do what it wants with it.
Hope that helps!