0

Hi codemasters, I'm new to this forum and I already have a question which I'm pretty sure u will help me out to find a solution.

I want to play a mc when the mouse is over. And when the mouse is out I want to rewind the mc. I have tried several things but nothing seems to work.

When the mouse is over it plays the mc, but when the mouse is out I get the following error:

Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
at 4animarqme_fla::Sprite62_21/onOutHandler()[4animarqme_fla.Sprite62_21::frame1:24]

Also I want to point out that I the script is written on the mc timeline, frame 1 has the following code, while the next frames have "rewind = true;" and the last frame has "rewind = true;
stop();"

HELP!

import flash.events.MouseEvent;

buttonMode = true;
var rewind:Boolean = false;

stop();

addEventListener(MouseEvent.MOUSE_OVER, startLoop)

function startLoop(e:MouseEvent)
{
    rewind = false;
	this.play();
}

addEventListener(MouseEvent.MOUSE_OUT, onOutHandler);

function onOutHandler(e:MouseEvent)
{	
	do
	{
	   prevFrame();
	} while (rewind == true);
	
}
1
Contributor
1
Reply
2
Views
7 Years
Discussion Span
Last Post by chevechiva
0

It's been solved! thanx!

Hi codemasters, I'm new to this forum and I already have a question which I'm pretty sure u will help me out to find a solution.

I want to play a mc when the mouse is over. And when the mouse is out I want to rewind the mc. I have tried several things but nothing seems to work.

When the mouse is over it plays the mc, but when the mouse is out I get the following error:

Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
at 4animarqme_fla::Sprite62_21/onOutHandler()[4animarqme_fla.Sprite62_21::frame1:24]

Also I want to point out that I the script is written on the mc timeline, frame 1 has the following code, while the next frames have "rewind = true;" and the last frame has "rewind = true;
stop();"

HELP!

import flash.events.MouseEvent;

buttonMode = true;
var rewind:Boolean = false;

stop();

addEventListener(MouseEvent.MOUSE_OVER, startLoop)

function startLoop(e:MouseEvent)
{
    rewind = false;
	this.play();
}

addEventListener(MouseEvent.MOUSE_OUT, onOutHandler);

function onOutHandler(e:MouseEvent)
{	
	do
	{
	   prevFrame();
	} while (rewind == true);
	
}
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.