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);
	
}

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);
	
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.