Highlighted

gotoAndPlay on hover... What's missing?

Community Beginner ,
Feb 21, 2020

Copy link to clipboard

Copied

I have a symbol that I want to scale using the timeline when it's hovered. I can't figure it out.

 

Please check out the screenshot >>  https://i.stack.imgur.com/ar02p.jpg

 

var frequency = 3;
stage.enableMouseOver(frequency);
this.bitez_main.addEventListener("mouseover", fl_MouseOverHandler_1);

function fl_MouseOverHandler_1()
{
this.bitez_main.bitez_over.gotoAndPlay(2);
}

 

 

Community Beginner
Correct answer by Talhaa | Community Beginner

I have used Animate's code wizard and it worked!

This is the code that's generated

 

var _this = this;
/*
Mousing over the specified symbol instance executes a function.
'3' is the number of the times event should be triggered.
*/stage.enableMouseOver(3);_this.main_mc_bitez.on('mouseover', function(){
/*
Moves the playhead to the specified frame number in the timeline and continues playback from that frame.
Can be used on the main timeline or on movie clip timelines.
*/_this.main_mc_bitez.gotoAndPlay(2);
});
TOPICS
ActionScript, Code, How to, Timeline

Views

261

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

gotoAndPlay on hover... What's missing?

Community Beginner ,
Feb 21, 2020

Copy link to clipboard

Copied

I have a symbol that I want to scale using the timeline when it's hovered. I can't figure it out.

 

Please check out the screenshot >>  https://i.stack.imgur.com/ar02p.jpg

 

var frequency = 3;
stage.enableMouseOver(frequency);
this.bitez_main.addEventListener("mouseover", fl_MouseOverHandler_1);

function fl_MouseOverHandler_1()
{
this.bitez_main.bitez_over.gotoAndPlay(2);
}

 

 

Community Beginner
Correct answer by Talhaa | Community Beginner

I have used Animate's code wizard and it worked!

This is the code that's generated

 

var _this = this;
/*
Mousing over the specified symbol instance executes a function.
'3' is the number of the times event should be triggered.
*/stage.enableMouseOver(3);_this.main_mc_bitez.on('mouseover', function(){
/*
Moves the playhead to the specified frame number in the timeline and continues playback from that frame.
Can be used on the main timeline or on movie clip timelines.
*/_this.main_mc_bitez.gotoAndPlay(2);
});
TOPICS
ActionScript, Code, How to, Timeline

Views

262

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
Feb 21, 2020 0
Adobe Community Professional ,
Feb 21, 2020

Copy link to clipboard

Copied

When things aren't working, always re-examine your assumptions. Put this in your mouseover handler:

alert(this.bitez_main);

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...
Feb 21, 2020 0
Community Beginner ,
Feb 22, 2020

Copy link to clipboard

Copied

I removed that line for the sake of this question. The alert comes fine. The movieclip doesn't run.

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...
Feb 22, 2020 0
Community Beginner ,
Feb 22, 2020

Copy link to clipboard

Copied

I have used Animate's code wizard and it worked!

This is the code that's generated

 

var _this = this;
/*
Mousing over the specified symbol instance executes a function.
'3' is the number of the times event should be triggered.
*/stage.enableMouseOver(3);_this.main_mc_bitez.on('mouseover', function(){
/*
Moves the playhead to the specified frame number in the timeline and continues playback from that frame.
Can be used on the main timeline or on movie clip timelines.
*/_this.main_mc_bitez.gotoAndPlay(2);
});

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...
Feb 22, 2020 0