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

Movieclip wont do roll out animation properly

Explorer ,
Jul 22, 2025 Jul 22, 2025

Im making a movieclip as a navigation button on my html5 canvas. I want a simple roll in and roll out animation. What i noticed is the animation wont roll out from the button. I have asked chatgpt everything how to make only a specific area of a movieclip interact nothing works. Also the movieclip is glitchy sometimes even when the mouse is completely out from the movieclip it still holds on hover. I have tried so many codes and everything. How can i make it work smoothly and make several buttons in the same movieclip do the same roll in roll out animation you see in the video i attached.
This is the code for me movieclip right now: 

let currentState = "idle"; // Can be "idle", "hovering", "hoveringOut"

this.navi1.stop();

this.navi1.addEventListener("mouseover", function () {
if (currentState !== "hovering") {
currentState = "hovering";
this.navi1.gotoAndPlay("hoverIn");
}
}.bind(this));

this.navi1.addEventListener("mouseout", function () {
if (currentState !== "hoveringOut") {
currentState = "hoveringOut";
this.navi1.gotoAndPlay("hoverOut");
}
}.bind(this));

609
Translate
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 , Jul 22, 2025 Jul 22, 2025

add

 

stage.enableMouseOver(10);

Translate
Community Expert ,
Jul 22, 2025 Jul 22, 2025

add

 

stage.enableMouseOver(10);

Translate
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
Explorer ,
Jul 22, 2025 Jul 22, 2025

Thank you so much this really helped. But is there anyway to make it hover out inside the movieclip. Right now it hovers out but only when the mouse is outside the movieclip is there any way to make it hover out earlier?

Translate
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 ,
Jul 22, 2025 Jul 22, 2025

like when?

Translate
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
Explorer ,
Jul 22, 2025 Jul 22, 2025

When the mouse cursor is on the fent reactor button i want the memes button to roll back to its idle state

Translate
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 ,
Jul 22, 2025 Jul 22, 2025

assign the mouse out to fent and remove from the current.

Translate
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
Explorer ,
Jul 22, 2025 Jul 22, 2025

Code please?

Translate
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 ,
Jul 22, 2025 Jul 22, 2025

stage.enableMouseOver(10);

 

let currentState = "idle"; // Can be "idle", "hovering", "hoveringOut"

this.navi1.stop();

this.navi1.addEventListener("mouseover", function () {
if (currentState !== "hovering") {
currentState = "hovering";
this.navi1.gotoAndPlay("hoverIn");
}
}.bind(this));

this.fent.addEventListener("mouseout", function () {  // or this.navi1.kent if kent is a child of navi1
if (currentState !== "hoveringOut") {
currentState = "hoveringOut";
this.navi1.gotoAndPlay("hoverOut");
}
}.bind(this));

Translate
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
Explorer ,
Jul 22, 2025 Jul 22, 2025

Should fent have some kind of instance name or anything like that? Remember this is not a regular button its a movieclip that will change shapes depending on where the mouse cursor is

Translate
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
Explorer ,
Jul 22, 2025 Jul 22, 2025

The code you sent me caused my canvas to crash and its blank when it test it in browser

Translate
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 ,
Jul 22, 2025 Jul 22, 2025

of course fent needs to have an instance name.  you can't reference anything with code (by name) unless it's named.

Translate
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
Explorer ,
Jul 25, 2025 Jul 25, 2025

Hello kglad. I have tried this and i got issues. 

}.bind(this));

this.fent.addEventListener("mouseout", function () {  // or this.navi1.kent if kent is a child of navi1
if (currentState !== "hoveringOut") {
currentState = "hoveringOut";
this.navi1.gotoAndPlay("hoverOut");
}
}.bind(this));
This didn't work but could it be because navi1 and fent have the same hoverin and hoverout? Should i renamed them hoverin2 and hoverout2? instead?

Translate
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
Explorer ,
Jul 25, 2025 Jul 25, 2025

Also i must add that adding the fent caused my whole html5 canvas to break.

Translate
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 ,
Jul 25, 2025 Jul 25, 2025

are you seeing error messages in the console?

Translate
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
Explorer ,
Jul 25, 2025 Jul 25, 2025

Uncaught ReferenceError: AdobeAn is not defined
at init (rawsourcescybertronic.html?26831:24:11)
at onload (rawsourcescybertronic.html?26831:101:44)
Yes these are the errors.

Translate
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
Explorer ,
Jul 25, 2025 Jul 25, 2025

Forgot to add: Uncaught SyntaxError: Unexpected token ')'

Translate
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 ,
Jul 25, 2025 Jul 25, 2025

what line of code had the unexpected token?

Translate
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
Explorer ,
Jul 25, 2025 Jul 25, 2025

That canvas is gone now but there's barely any difference
Uncaught SyntaxError: Unexpected token ':'
Now i got this error and it breaks the html5 too. Whenver i attach any code to the fent my website breaks. The fent code you sent me was placed on the maintimeline not inside the navi1 movieclip. 

Translate
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 ,
Jul 25, 2025 Jul 25, 2025
LATEST

what are the current errors?

Translate
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 ,
Jul 22, 2025 Jul 22, 2025

Hi.

 

I think it's easier to use a Button symbol because you don't have to code the hover interaction.

 

Here is an exmple of how to achieve this behavior in a very simple way, by smartly structuring the buttons and only using a couple of stops.
https://github.com/joao-cesar/adobe/tree/master/animate%20cc/html5_canvas/simple_hover_interaction

Regards,
JC

Translate
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
Explorer ,
Jul 22, 2025 Jul 22, 2025

The thing is i want to make my buttons smoothly change when i hover them. Im trying to make one movieclip play certain keyframes inside of the movieclip when the mouse interacts with one of the buttons. Is this hard to achieve?

Translate
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 ,
Jul 22, 2025 Jul 22, 2025

read my post

Translate
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 ,
Jul 22, 2025 Jul 22, 2025

The buttons smoothly change in the sample provided.

 

Although it's a Button symbol, there's a MovieClip instance containing an animation in each state (up and over).

Translate
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
Explorer ,
Jul 22, 2025 Jul 22, 2025

My issue was fixed btw i dont know what happened but the animation started working fine. Now i have a new another problem

Translate
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 ,
Jul 23, 2025 Jul 23, 2025

one down.  that's how you debug.

Translate
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