Give help. Get help.

  • # August 29, 2009 at 8:40 pm

    Im making a website for a client and they want a site similar to:

    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.

    # August 30, 2009 at 11:26 pm

    The only thing I can think of is to create an actionscript file to do it for you, like so:

    [Event(name=”close”, type=””)]
    [Event(name=”open”, type=””)]

    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.

    Hope that helps!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.