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

problems with buttons

Community Beginner ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

Hello,

I try to make a GPS device interactive for a learning module. The problem is when I put an action to a button that he has to go to a frame the first time is no problem. He has to show what is on the display and a new button. This button is the same as before but needs a new different action ( show another button and display) but he is not going to the next button and display. he just stops.

Can anybody help me.

This is the code I use:


var _this = this;
/*
Clicking on the specified symbol instance executes a function.
*/
_this.knop_menu_01.on('click', function(){
/*
Moves the playhead to the specified frame number in the timeline and stops the movie.
Can be used on the main timeline or on movie clip timelines.
*/
_this.gotoAndStop(28);
});

 

Views

236

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 ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

i don't know what you mean by, "This button is the same as before.." but a button that executes different code is in no way (other than possibly appearance), the same.  it's a different button with a different instance name and different code.

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 ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

It is for this device. There are lots of buttons who has more options. for example the menu button. When you klik the first time on this button (I made a button with the name knop_menu_01) something popups on de screen. Than you have to klik a second time on the button (button name knop_menu_02) a different screen is visible. But he stops after the first button. The code above is for the first button (knop_menu_01) the only change I did was the name of the button. But he won't go to the second screen.

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 ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

Sorry here is the device.

basis_dagr_05 kopiëren.jpg

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
Enthusiast ,
May 30, 2021 May 30, 2021

Copy link to clipboard

Copied

LATEST

If you just jump the frame.(I can't speak English, I use translation software, so please understand)

 

//Create an array to hold the frames you want to jump

_this=this

target_frame=[28,29,31,46,59];

//The first page

Goto_Page=0;      

_this.knop_menu_01.on('click', function(){

//Jump to the specified location of the array

_this.gotoAndStop(target_frame[Goto_Page]);

//The array position plus 1 after the jump.

Goto_Page=Goto_Page+1 

}

 

//My English is very poor.Whether the text is understandable

 

_this=this

target_frame=[28,29,31,46,59];

Goto_Page=0;      

_this.knop_menu_01.on('click', function(){

_this.gotoAndStop(target_frame[Goto_Page]);

//Only within the range of arrays

if(Goto_Page<target_frame.length-1){Goto_Page++}

}

 

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