O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  



How to Pause a Flash Movie
Pauses (stops) a Flash movie's animation and code from running.

Contributed by:
Jester XL
[03/26/04 | Discuss (0) | Link to this hack]

Basically, this brings up a print dialogue that is modal. This stops all animation and code in the Flash Player 7. Untested on Mac.

function pauseMovie()
{
        var p = new PrintJob();
        p.start();
}

function onKeyDown()
{
        switch(Key.getCode()){
                case 80: // p key
                pauseMovie();
                break;
                case 19: // pause/break key
                pauseMovie();
                break;
        }
}

Key.addListener(this);

See also: http://www.jessewarden.com/archives/000495.html


O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.