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

simple question; how do I move from frame to frame with buttons on an Animate CC HTML5 canvas

Community Beginner ,
May 07, 2018 May 07, 2018

I can't make a button component work; I dragged it from the components list directly to the stage, converted it to symbol, gave it an instance name and gave it the "Click to Go to Frame and Stop" snippet.

I've tried variations of...

this.button_1.addEventListener("click", firstButton.bind(this));

function firstButton()

{

this.gotoAndStop(2);

}

what am I missing?

747
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
LEGEND ,
May 07, 2018 May 07, 2018

Why on earth are you using the components? Just make a button symbol and use that.

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 Beginner ,
May 07, 2018 May 07, 2018

Hi Clay,

Tried that also, and it works to open a webpage but not to move to another frame......as for the component, I was just following another tutorial on YouTube for that instance....so what's wrong with my code that it won't move from frame 1 to frame 2?

On Monday, May 7, 2018, 5:40:06 PM EDT, ClayUUID <forums_noreply@adobe.com> wrote:

simple question; how do I move from frame to frame with buttons on an Animate CC HTML5 canvas

created by ClayUUID in Adobe Animate CC - General - View the full discussion

Why on earth are you using the components? Just make a button symbol and use that.

If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/10367599#10367599 and clicking ‘Correct’ below the answer

Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:

Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/10367599#10367599

To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"

Start a new discussion in Adobe Animate CC - General by email or at Adobe Community

For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

This email was sent by Adobe Community because you are a registered user.

You may unsubscribe instantly from Adobe Community, or adjust email frequency in your email preferences

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 Beginner ,
May 08, 2018 May 08, 2018

To make a button move the animation to the next frame this is the way I have done it,

Put some text or a rectangle on your scene, convert to symbol (button) and give the button an instance name (on the properties panel)

Select your button, go to window - Actions on the code editor I suggest you use the code snippets HTML5 Canvas - Timeline navigation - Click to go to frame and play, this will add a piece of code if you double click.

and then you just have to change the frame number that you see in between parenthesis on the this.goToandPlay(2) statement.  remember that the number is counted starting from first frame being 0 , second frame 1 and so on.

good luck.

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 Beginner ,
May 08, 2018 May 08, 2018

Hi Francisco,

Yes I tried that, it's standard procedure, but it wasn't working for me.....a YouTube tutorial mentioned converting it to symbol, then deleting it, then moving it's counterpart in the library back onto the stage and giving it the instance name.....this works and I'm beyond that problem now....I don't know why CC won't use the original conversion but at least it works....

On Tuesday, May 8, 2018, 8:25:56 AM EDT, franciscog47374926 <forums_noreply@adobe.com> wrote:

simple question; how do I move from frame to frame with buttons on an Animate CC HTML5 canvas

created by franciscog47374926 in Adobe Animate CC - General - View the full discussion

To make a button move the animation to the next frame this is the way I have done it,

 

Put some text or a rectangle on your scene, convert to symbol (button) and give the button an instance name (on the properties panel)

Select your button, go to window - Actions on the code editor I suggest you use the code snippets HTML5 Canvas - Timeline navigation - Click to go to frame and play.

 

and then you just have to change the frame number that you see after the this.goToandPlay(2) statement.  remember that the number is counted starting from first frame being 0 , second frame 1 and so on.

 

good luck.

If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/10368885#10368885 and clicking ‘Correct’ below the answer

Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:

Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/10368885#10368885

To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"

Start a new discussion in Adobe Animate CC - General by email or at Adobe Community

For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

This email was sent by Adobe Community because you are a registered user.

You may unsubscribe instantly from Adobe Community, or adjust email frequency in your email preferences

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
LEGEND ,
May 08, 2018 May 08, 2018
LATEST

Could you please not use email to respond to this thread. It's almost impossible to pick out your reply from all the boilerplate.

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