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

trying to keep my timeline neat by creating a slideshow of buttons within a button

New Here ,
Aug 25, 2018 Aug 25, 2018

so the title may be a bit confusing, but what im generally trying to do is make it so when i click this button, it turns into the next button, and that button turns into a different button when clicked, and so on. im trying to do this not on the main scene timeline though. what ive done is made a button, made a movie clip within it, then made all the different buttons and linked them with actionscript in the moveclip. but when i test it and try to click the first button, nothing happens. im pretty confused, so any help at all would be appreciated. thanks.

163
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 ,
Aug 25, 2018 Aug 25, 2018

use a movieclip with the first 'button' (actually just the shape/text you want) on frame 1 and subsequent shapes/text on subsequent frames.  put a stop() on frame 1 and use something like:

yourmovieclipbutton.addEventListener(MouseEvent.CLICK,clickF);

function clickF(e:MouseEvent):void{

switch (MovieClip(e.currentTarget).currentFrame){

case 1:

//do whatever

MovieClip(e.currentTarget).nextFrame();

break;

case 2:

//etc

}

}

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
New Here ,
Aug 26, 2018 Aug 26, 2018

thanks, i figured it out though.

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 ,
Aug 26, 2018 Aug 26, 2018
LATEST

you're welcome.

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