# URGENT; help!

**URL:** <https://forum.kirupa.com/t/urgent-help/261707>\
**Category:** flash\
**Created:** [May 30, 2008, 2:13am UTC](https://forum.kirupa.com/t/urgent-help/261707 "2008-05-30T02:13:10Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![KathrynRose](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@KathrynRose](https://forum.kirupa.com/u/KathrynRose)\
**Post date:** [May 30, 2008, 2:13am UTC](https://forum.kirupa.com/t/urgent-help/261707/1 "2008-05-30T02:13:10Z")

</div>

I am making a portfolio for my photography for a uni course.

I have never done coding before.

I simply want my portfolio to stop and then I have simple buttons to navigate through to other keyframes.

This is not working and it simply runs through my timeline. I have been trying to figure this out for days.

Please could someone have a look at my .fla file and help!!

[msn: [k.athryn.rose@hotmail.com](mailto:k.athryn.rose@hotmail.com)]

---

<div class="post-metadata">

**Author:** ![rbnzdave](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@rbnzdave](https://forum.kirupa.com/u/rbnzdave)\
**Post date:** [May 30, 2008, 2:40am UTC](https://forum.kirupa.com/t/urgent-help/261707/2 "2008-05-30T02:40:16Z")

</div>

no attachment to help with.

however. if its a actionscript 3 file in flash,  
make sure the buttons are on a layer that is visible with no new keyframes the whole way through. ( this will put them by themselves.)  
name the back button “buttonBack” ( as the \<Instance Name\>, not the caption);  
name the Next button “buttonForward” ( as the \<Instance Name\>);  
add the following :

```auto

var startFrame:Number = x; //replace x with the first picture frame;
var lastFrame:Number = x; //replace x with the last picture frame;
var currentFrame:Number = x; //replace x with first frame;

buttonForward.addEventListener(MouseEvent.MOUSE_UP,nextframe);
buttonBack.addEventListener(MouseEvent.MOUSE_UP,prevframe);

function nextFrame(e:Event):void {
   if (currentFrame < lastFrame) {
      currentFrame ++;
      e.target.parent.gotoAndStop(currentFrame);
   }
}

function prevFrame(e:Event):void {
   if (currentFrame > lastFrame) {
      currentFrame --;
      e.target.parent.gotoAndStop(currentFrame);
   }

}

```
