Skip navigation
Currently Being Moderated

How to create a slideshow with thumbnail panel that has next and previous buttons.

Apr 2, 2013 9:51 AM

Tags: #cs4 #flash #actionscript #flash_professional

Does anyone know how to create a simple slideshow with a thumbnail panel that has next and previous buttons in Flash CS4? Something that looks like this: http://www.drooza.com/projects/thumb_scroller/deploy/. I have gotten as far as creating a basic slideshow with rollover thumbnail panel at the bottom in actionscript 3.0 but can't find a proper video or tutorial on it. Please Help!!

 

This is my actionscript:

 

btn1.addEventListener(MouseEvent.ROLL_OVER,play1);

function play1(event:MouseEvent):void{

gotoAndStop ("falls")

}

btn2.addEventListener(MouseEvent.ROLL_OVER,play2);

function play2(event:MouseEvent):void{

gotoAndStop ("wind")

}

btn3.addEventListener(MouseEvent.ROLL_OVER,play3);

function play3(event:MouseEvent):void{

gotoAndStop ("beach")

}

btn4.addEventListener(MouseEvent.ROLL_OVER,play4);

function play4(event:MouseEvent):void{

gotoAndStop ("rain")

}

 

Where do I go from here?

 

 

Regards,

Rae

 
Replies
  • kglad
    72,220 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 2, 2013 11:49 AM   in reply to raenlonicera

    you can use:

     

     

    var frameA:Array=["falls","wind","beach","rain"];

    next_btn.addEventListener(MouseEvent.CLICK,nextF);
    prev_btn.addEventListener(MouseEvent.CLICK,prevF);

    function nextF(e:MouseEvent):void{
    var i:int=frameA.indexOf(this.currentFrameLabel);
    this.gotoAndStop((i+1)%frameA.length);
    }

    function prevF(e:MouseEvent):void{

    var i:int=frameA.indexOf(this.currentFrameLabel);

    this.gotoAndStop((i+frameA.length-1)%frameA.length);

    }


     

    btn1.addEventListener(MouseEvent.ROLL_OVER,play1);

    function play1(event:MouseEvent):void{

    gotoAndStop ("falls")

    }

    btn2.addEventListener(MouseEvent.ROLL_OVER,play2);

    function play2(event:MouseEvent):void{

    gotoAndStop ("wind")

    }

    btn3.addEventListener(MouseEvent.ROLL_OVER,play3);

    function play3(event:MouseEvent):void{

    gotoAndStop ("beach")

    }

    btn4.addEventListener(MouseEvent.ROLL_OVER,play4);

    function play4(event:MouseEvent):void{

    gotoAndStop ("rain")

    }

     

     
    |
    Mark as:
  • kglad
    72,220 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 2, 2013 7:23 PM   in reply to raenlonicera

    what's next_btn.next_btn????

     

    or, why don't you add a next_btn to the frame that contains that code and use the code i suggested?

     
    |
    Mark as:
  • Currently Being Moderated
    Apr 2, 2013 7:41 PM   in reply to kglad

    I think that first dot after next_btn is a period to end a sentence.

     
    |
    Mark as:
  • kglad
    72,220 posts
    Jul 21, 2002
    Currently Being Moderated
    Apr 3, 2013 8:00 AM   in reply to raenlonicera

    when that code executes, you need a button named next_btn and one named prev_btn.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points