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.
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
...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;
}
}
Copy link to clipboard
Copied
you're welcome.