• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

trying to get rollover to work in animate CC

Community Beginner ,
Jan 17, 2017 Jan 17, 2017

Copy link to clipboard

Copied

Hi

I'm currently in the final phase of my website. I only need one more button.

I am used to AS and used to script like this:

https://www.youtube.com/watch?v=z8nsbt745IQ

I'm trying to just make a button of a sketchbook that's closed until frame 80. Frame 1 has a stop() script on it

and when I try to script the invisible hitbox behind the sketchbook the drawing doesn't appear when I test it. I have tried nearly all the tutorials I can find about scripting something.

I have tried AS on the invisible hitbox as a movie clip, a button or a symbol. I have tried scripting it in the timeline with the listen script. all of those options show a blanc page in my browsers when I hit test. without it the animation stops at the stop() frame. Only when I used a different script (I don't recall which one) it ignored the stops and kept looping.

It should not be this hard to just put a movie clip in your mouseover, hell I'd even like the option to add frames in the over state. Would make my life easier atleast.

The sketchbook should be closed and only open on mouseover and three links should float out. they should also be clickable. I have the animation spread over 6 frames, I drew them frame by frame in photoshop. 6 frames and 6 images.

I know this to be a piece of cake in flash CS2 and 3, I am left clueless in the CC version. The information provided when I use those snippets is insufficient. I have the dutch version for some reason.

Also, I drew the sketchbook in Photoshop, because I like how the pencils work there. When I create a new AS document in Animate I cannot use images. I only need the mouse over to go to and play frame 80 and stop at 95.

Must be publishable to a format usable in Muse, as the entire website is nearing the final state. I have made animations for my website in Animate and they work, just this stupid button doesn't. Sorry for rambling but these few lines of code have got me stalled for 8 hours now. Can't get my mind off it.

Kind regards

T.

Views

1.1K

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
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 17, 2017 Jan 17, 2017

mouseover code in as3 is:

your_mc.addEventListener(MouseEvent.MOUSE_OVER,overF);

your_mc.addEventListener(MouseEvent.MOUSE_OUT,outF);

function overF(e:MouseEvent):void{

your_mc.play();  // make sure there's a stop() attached to the last frame of your_mc if you do not want the animation to loop

}

function outF(e:MouseEvent):void{

your_mc.gotoAndStop(1);

}

Votes

Translate

Translate
Community Expert ,
Jan 17, 2017 Jan 17, 2017

Copy link to clipboard

Copied

mouseover code in as3 is:

your_mc.addEventListener(MouseEvent.MOUSE_OVER,overF);

your_mc.addEventListener(MouseEvent.MOUSE_OUT,outF);

function overF(e:MouseEvent):void{

your_mc.play();  // make sure there's a stop() attached to the last frame of your_mc if you do not want the animation to loop

}

function outF(e:MouseEvent):void{

your_mc.gotoAndStop(1);

}

Votes

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
community guidelines
Community Beginner ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

The keyframes at 85 have the animation, but it's the same animation as found in mc animation. Trigger is the invisible hitbox. The mc animation has a start and a finish. Or do I script the entire thing in the mc animation only? I recall being able to just make a mouseover go to a new Frame (85 in this case). The only purpose of this file is to be published to Muse. so the entire artboard is my button. I even recall Fireworks doing this without any coding.

Currently this is the code you provided, but it gives me a blank page in my browsers.

Schermafbeelding 2017-01-18 om 10.40.36.png

Votes

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
community guidelines
Community Beginner ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

Also

stop()

on the last frame in the movie clip has no effect

Votes

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
community guidelines
Community Beginner ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

I got it to work with a click, but now when I preview in Muse it shows nothing in my browsers. I miss the old days when coding was easy, and people used Flash

Votes

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
community guidelines
Community Expert ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

if you're using a canvas project the coding language is createjs/javascript, not actionscript.  use:

stage.enableMouseOver(15);

this.your_mc.addEventListener('mouseover',overF.bind(this));

this.your_mc.addEventListener('mouseout',outF.bind(this));

function overF(et){

this.your_mc.play();  // make sure there's a stop() attached to the last frame of your_mc if you do not want the animation to loop

}

function outF(e){

this.your_mc.gotoAndStop(0);

}

// and use:

this.stop(); // not stop()

Votes

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
community guidelines
Community Beginner ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

yeah, I felt dumb when I realized that. But now the animation works in Animate, Muse refuses to cooperate, my other side animations work (.aom files, all of them). This one doesn't even show up. There is still a conflict somewhere and I don't get any logs.

Votes

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
community guidelines
Community Expert ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

i don't use muse so i can't help you with problems there.

i would post in the muse forum to see if you can get help with that part of your project.

Votes

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
community guidelines
Community Beginner ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

anyway, I forgot to thank you for your responses.

Thanks!

Off to the Muse forums, there are more people with the issue.

Votes

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
community guidelines
Community Expert ,
Jan 18, 2017 Jan 18, 2017

Copy link to clipboard

Copied

LATEST

you're welcome.

Votes

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
community guidelines