Highlighted

Animation only playing on Hover

New Here ,
Jul 01, 2019

Copy link to clipboard

Copied

Hello, I use Flash CS6 and AS2 and i made a animation with a waterball.

So the problem is i dont want the animation to run instantly at loading the SWF up only if you Hover over it.

Can you guys please tell me what i need to change to make it really only at hover?

Thanks.

-Marc                        

Maybe you did not understand me.

On the first frame of the button show only the first frame of the animation or nothing if you like.

On the roll over state put the animation.

Then when the SWF loads you will have a static image and only it will play when you hover over it.

You can show on the first frame of the button the container, but switch it to Graphic and stop it.

Views

195

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Animation only playing on Hover

New Here ,
Jul 01, 2019

Copy link to clipboard

Copied

Hello, I use Flash CS6 and AS2 and i made a animation with a waterball.

So the problem is i dont want the animation to run instantly at loading the SWF up only if you Hover over it.

Can you guys please tell me what i need to change to make it really only at hover?

Thanks.

-Marc                        

Maybe you did not understand me.

On the first frame of the button show only the first frame of the animation or nothing if you like.

On the roll over state put the animation.

Then when the SWF loads you will have a static image and only it will play when you hover over it.

You can show on the first frame of the button the container, but switch it to Graphic and stop it.

Views

196

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Jul 01, 2019 0
Adobe Community Professional ,
Jul 01, 2019

Copy link to clipboard

Copied

assuming you have no streams (eg, video and sound), list all frame 1 movieclips in an array, eg

this.onRollOver = overF;  // note: you may need an object with _alpha=0 on stage.

var mcA:Array=[_this,mc1,mc2,...];   // should contain, at least, _this

playF(mcA,false);

function overF():Void{

playF(mcA,true);

}

function playF(a:Array,b:Boolean):Void{

if(b){

for(var i:Number=i<mcA.length;i++){

MovieClip(mcA.play());

}

// may want to 'delete' event listener

} else {

for(var i:int=i<mcA.length;i++){

MovieClip(mcA.stop());

}

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 01, 2019 0
New Here ,
Jul 01, 2019

Copy link to clipboard

Copied

Am i supposed to set that into the AS Code of the animation?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 01, 2019 0
Adobe Community Professional ,
Jul 01, 2019

Copy link to clipboard

Copied

yes, that should be added to the actions panel, frame 1 of the main timeline

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 01, 2019 0
New Here ,
Jul 01, 2019

Copy link to clipboard

Copied

It gives me many errors that it expects ; and unexpected apperiance of . or class called "int" cant be loaded and block needs to be closed with } 😕

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 01, 2019 0
Adobe Community Professional ,
Jul 01, 2019

Copy link to clipboard

Copied

try:

this.onRollOver = overF;  // note: you may need an object with _alpha=0 on stage.

var mcA:Array=[_this,mc1,mc2,...];   // should contain, at least, _this

playF(mcA,false);

function overF():Void{

playF(mcA,true);

}

function playF(a:Array,b:Boolean):Void{

if(b){

for(var i:Number=i<mcA.length;i++){

MovieClip(mcA.play());

}

// may want to 'delete' event listener

} else {

for(var i:Number=i<mcA.length;i++){

MovieClip(mcA.stop());

}

}

}

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 01, 2019 0
Guide ,
Jul 02, 2019

Copy link to clipboard

Copied

Hi mate,

A very simple way may be to put your animation inside a Button symbol on the Roll over frame and then define the hover area.

While the mouse is over, the animation which should be inside a Movieclip, will loop, unless you have a stop somewhere.

Hope this helps!

- Nick: Character designer and animator, Flash user since 1998
Member of Flanimate Power Tools team - extensions for character animation

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 02, 2019 0
New Here ,
Jul 02, 2019

Copy link to clipboard

Copied

It  Helps a bit^^ But the problem is that like the Animation is playing as soon as the SWF Gets Loaded/Started and i dont want tht i just want it to come up at a Hover.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 02, 2019 0
Guide ,
Jul 02, 2019

Copy link to clipboard

Copied

Maybe you did not understand me.

On the first frame of the button show only the first frame of the animation or nothing if you like.

On the roll over state put the animation.

Then when the SWF loads you will have a static image and only it will play when you hover over it.

You can show on the first frame of the button the container, but switch it to Graphic and stop it.

- Nick: Character designer and animator, Flash user since 1998
Member of Flanimate Power Tools team - extensions for character animation

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 02, 2019 0
Guide ,
Jul 02, 2019

Copy link to clipboard

Copied

Here is a sample setup: hover_to_play.fla - Google Drive

- Nick: Character designer and animator, Flash user since 1998
Member of Flanimate Power Tools team - extensions for character animation

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 02, 2019 0
Diliard LATEST
New Here ,
Jul 02, 2019

Copy link to clipboard

Copied

Thanks!

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Jul 02, 2019 0