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

Building Multiple Slides/Frames - Need Help!

Explorer ,
Jul 06, 2015 Jul 06, 2015

Copy link to clipboard

Copied

Hello, I only recently started learning AS3 and have been unable to accomplish what I would consider to be one of the most simplest tasks, creating multiple frames/slides. As a matter of fact I have been unable to find the existence of what I would consider to be such a basic function!

I would like to set up multiple pages,with a 'go to next page button'. For example:

Slide/Frame 1
Go to next slide Button

Now, when the user clicks the go to next slide button I would like the following to appear....

Slide/Frame2
Go to previous slide Button

Noting that I don't want any of the First Frame/Slide scripts or objects to be present or active on the second Frame/Slide.

Thanks for the help.

TOPICS
ActionScript

Views

348

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 , Jul 07, 2015 Jul 07, 2015

on your first frame place a next button and a previous button (eg, next_btn and prev_btn).  extend the layer that contains both across the timeline that you want to act like a slideshow.

create an actions layer and add the following script:

stop();

next_btn.addEventListener(MouseEvent.CLICK,nextF);

prev_btn.addEventListener(MouseEvent.CLICK,prevF);

buttonVisF();

function nextF(e:MouseEvent):void{

nextFrame();

}

function prevF(e:MouseEvent):void{

prevFrame();

}

function buttonVisF():void{

next_btn.visible=pre

...

Votes

Translate

Translate
Community Expert ,
Jul 07, 2015 Jul 07, 2015

Copy link to clipboard

Copied

on your first frame place a next button and a previous button (eg, next_btn and prev_btn).  extend the layer that contains both across the timeline that you want to act like a slideshow.

create an actions layer and add the following script:

stop();

next_btn.addEventListener(MouseEvent.CLICK,nextF);

prev_btn.addEventListener(MouseEvent.CLICK,prevF);

buttonVisF();

function nextF(e:MouseEvent):void{

nextFrame();

}

function prevF(e:MouseEvent):void{

prevFrame();

}

function buttonVisF():void{

next_btn.visible=prev_btn.visible=false;

if(this.currentFrame>1){

prev_btn.visible=true;

}

if(this.currentFrame<this.totalFrames){

next_btn.visible=true;

}

}

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 ,
Jul 24, 2015 Jul 24, 2015

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