Highlighted

can't get clicktag and mouseover to work in same ad

New Here ,
Jan 17, 2019

Copy link to clipboard

Copied

I have an ad for google doubleclick, and i was able to get the clicktag working finally, but then my mouseover that played a white flash over my button stopped working. when i remove the clicktag, the mouseover works again. I have little or no knowledge of actionscripting- any idea what I am doing wrong?

Thanks!

My fla file:

Dropbox - GrantsBusinesswoman02 160x600 20190118.fla

Hi Christina

just to clarify, your FLA is in HTML5/Canvas format, hence you are not actionscripting, you are javascripting.

Anyway, I understand, that you want mouseover and clicktag to work both together. In your FLA/code I didn't find anything related to mouseover, so I'm not sure where actually your mistake was.

Your Animation plays entirely on the main timeline, the flashes over your button start playing in the frames 176 and 235. So on mouseover the playhead needs to go back to one of those frames to play the flash. What I did is to set a label in frame 235 and called it "flash". Then in frame 240 (the last frame) I added a little javascript:

var mtl = this;

this.exit.on("mouseover", function () {

    mtl.gotoAndPlay("flash");

});

I made this in your last frame, because we don't want the playhead to jump forward to 235 (flash), should a user mouseover before the animation is finished.

This var mtl = this is necessary because, in short, the scope within the event function this.exit.on(...) is slightly different from outside the function. We have to wrap this in a variable mtl to have access to this witin the event function. Long story, blah. mtl is my style and stands for main timeline. This makes sense to me, though it could be named anything really.

So to me it looks like clicktag and mouseover are working. I've put my amended file with a shorter name here:

Dropbox - GBusinesswomanXP.fla

Klaus

TOPICS
Discussions

Views

92

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

can't get clicktag and mouseover to work in same ad

New Here ,
Jan 17, 2019

Copy link to clipboard

Copied

I have an ad for google doubleclick, and i was able to get the clicktag working finally, but then my mouseover that played a white flash over my button stopped working. when i remove the clicktag, the mouseover works again. I have little or no knowledge of actionscripting- any idea what I am doing wrong?

Thanks!

My fla file:

Dropbox - GrantsBusinesswoman02 160x600 20190118.fla

Hi Christina

just to clarify, your FLA is in HTML5/Canvas format, hence you are not actionscripting, you are javascripting.

Anyway, I understand, that you want mouseover and clicktag to work both together. In your FLA/code I didn't find anything related to mouseover, so I'm not sure where actually your mistake was.

Your Animation plays entirely on the main timeline, the flashes over your button start playing in the frames 176 and 235. So on mouseover the playhead needs to go back to one of those frames to play the flash. What I did is to set a label in frame 235 and called it "flash". Then in frame 240 (the last frame) I added a little javascript:

var mtl = this;

this.exit.on("mouseover", function () {

    mtl.gotoAndPlay("flash");

});

I made this in your last frame, because we don't want the playhead to jump forward to 235 (flash), should a user mouseover before the animation is finished.

This var mtl = this is necessary because, in short, the scope within the event function this.exit.on(...) is slightly different from outside the function. We have to wrap this in a variable mtl to have access to this witin the event function. Long story, blah. mtl is my style and stands for main timeline. This makes sense to me, though it could be named anything really.

So to me it looks like clicktag and mouseover are working. I've put my amended file with a shorter name here:

Dropbox - GBusinesswomanXP.fla

Klaus

TOPICS
Discussions

Views

93

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
Jan 17, 2019 0
Advocate ,
Jan 18, 2019

Copy link to clipboard

Copied

Hi Christina

just to clarify, your FLA is in HTML5/Canvas format, hence you are not actionscripting, you are javascripting.

Anyway, I understand, that you want mouseover and clicktag to work both together. In your FLA/code I didn't find anything related to mouseover, so I'm not sure where actually your mistake was.

Your Animation plays entirely on the main timeline, the flashes over your button start playing in the frames 176 and 235. So on mouseover the playhead needs to go back to one of those frames to play the flash. What I did is to set a label in frame 235 and called it "flash". Then in frame 240 (the last frame) I added a little javascript:

var mtl = this;

this.exit.on("mouseover", function () {

    mtl.gotoAndPlay("flash");

});

I made this in your last frame, because we don't want the playhead to jump forward to 235 (flash), should a user mouseover before the animation is finished.

This var mtl = this is necessary because, in short, the scope within the event function this.exit.on(...) is slightly different from outside the function. We have to wrap this in a variable mtl to have access to this witin the event function. Long story, blah. mtl is my style and stands for main timeline. This makes sense to me, though it could be named anything really.

So to me it looks like clicktag and mouseover are working. I've put my amended file with a shorter name here:

Dropbox - GBusinesswomanXP.fla

Klaus

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...
Jan 18, 2019 0