Grow your CSS skills. Land your dream job.

Please help with flash! Thank You!

  • # August 29, 2009 at 8:40 pm

    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?

    Thank you so much.

    # August 29, 2009 at 11:29 pm

    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.

    # 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:

    Code:
    [Event(name="close", type="flash.events.Event")]
    [Event(name="open", type="flash.events.Event")]

    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 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".