[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2765
  • Last Modified:

onmouseout pause, and on mouseover resume playing flash

Hello, i would like to know how can i make, flash. That when my mouse out of flash it pause (not stop) but pause, and then i mouseover flash again, it resume from same frame.  Let me know. Thanks!
0
springfresh
Asked:
springfresh
1 Solution
 
bluefezteamCommented:
hi - this depends on how you have built the flash movie.

If it is one big animation running from the time line, then you can have a button that only has a hitstate (invisible) over the entire flash movie that says onRollover {play();} onRollout{stop();}

that will start and stop things where they are in the timeline (paused)

If your flash movie is a series of nested animations then that is harder to simply pause, one way to do that could be to have the printer panel popup up which pauses everything where it stands - not the prettyest solution, but it depends how your flash movie is built.

Building it all as part of 1 animation is the easiest way as you simply set stop(); and then play();

code below is how to pause a movie using the print method
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);

Open in new window

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now