The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Please help with flash! Thank You!

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #25930

    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.


    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)
  • The forum ‘Other’ is closed to new topics and replies.