Movie Play Controls skipping first and last frame ?!!!

  • Ray2004
  • Novice
  • Novice
  • User avatar
  • Posts: 17
  • Loc: Kuwait

Post 3+ Months Ago

I created a simple pics slideshow and added 'back' and 'forward' buttons.

My problem arises when I reach the last pic in the slideshow and I click the forward button. Instead of going to the first pic, flash jumps to the second pic

Also when I am navigating 'back' and I reach the first pic and then I click back once more, flash goes to the before last pic (where it should go to the last pic).

On the forward button I have the following code:

Code: [ Select ]
on (press)
{
    if (this._currentframe == this._totalframes )
    { GoToAndStop (1); }
    Else
    { nextFrame(); }
}
  1. on (press)
  2. {
  3.     if (this._currentframe == this._totalframes )
  4.     { GoToAndStop (1); }
  5.     Else
  6.     { nextFrame(); }
  7. }


and on the back button I have the following code:
Code: [ Select ]
on (press) {
            if (this._currentframe == 1)
                {
                GoToAndStop (this._totalframes);
                }
            Else
                {
            prevframe();
                }
            }
  1. on (press) {
  2.             if (this._currentframe == 1)
  3.                 {
  4.                 GoToAndStop (this._totalframes);
  5.                 }
  6.             Else
  7.                 {
  8.             prevframe();
  9.                 }
  10.             }



I have uploaded the fla file (created in MX , not mx 2004) to the following URL:
http://www.geocities.com/argilah2004/PostforHelp.fla

and the swf movie on:
http://www.geocities.com/argilah2004/postforhelp.swf
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5148
  • Loc: SC-USA

Post 3+ Months Ago

try this:

Code: [ Select ]
on (release) {
    if (_currentframe === _totalframes) {
        gotoAndStop(1);
    } else {
        nextFrame();
    }
}
  1. on (release) {
  2.     if (_currentframe === _totalframes) {
  3.         gotoAndStop(1);
  4.     } else {
  5.         nextFrame();
  6.     }
  7. }


and this:

Code: [ Select ]
on (release) {
    if (_currentframe === 1) {
        gotoAndStop(_totalframes);
    } else {
        prevFrame();
    }
}
  1. on (release) {
  2.     if (_currentframe === 1) {
  3.         gotoAndStop(_totalframes);
  4.     } else {
  5.         prevFrame();
  6.     }
  7. }
  • Ray2004
  • Novice
  • Novice
  • User avatar
  • Posts: 17
  • Loc: Kuwait

Post 3+ Months Ago

Thanks for the help but none of the above worked. i even tried variations of the code You gave me above.
Anyways i really appreciate your help..
I am starting to think it might be a bug in flash
  • Ray2004
  • Novice
  • Novice
  • User avatar
  • Posts: 17
  • Loc: Kuwait

Post 3+ Months Ago

anyone?
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13504
  • Loc: Florida

Post 3+ Months Ago

Change the on(release) in dMs example to on(press), don't ask why cause I don't know.
I just know it skips when release is used & doesn't when press is :?

If that doen't work there's somthing else in the movie advancing the playhead.
  • Ray2004
  • Novice
  • Novice
  • User avatar
  • Posts: 17
  • Loc: Kuwait

Post 3+ Months Ago

Thanks, but it did not work. I am 100% bewildered by this. I mean i only have three layers, and almost no actionscript besides the one on the buttons. Its really weird. I'll just redo the whole thing from scratch when I got the time.
Thanks y'all

Post Information

  • Total Posts in this topic: 6 posts
  • Users browsing this forum: No registered users and 4 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.