Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 07-31-2010, 08:48 PM   #1
Registered User
Join Date: Jan 2010
Posts: 32
Red face Last Frame Viewed

I'm Trying To Get One Of The Simplest Of Scripts But I Can't Find It Anywhere for some reason.

How Do You Go To The Last Frame Viewed?!
I'm Really Confused... pls help

Last edited by Clayf700; 07-31-2010 at 10:30 PM.
Clayf700 is offline   Reply With Quote
Old 08-01-2010, 10:43 PM   #2
Registered User
Join Date: Oct 2009
Posts: 29

If you mean how to go to the preceeding frame, then it is prevFrame();
Solarflare is offline   Reply With Quote
Old 08-02-2010, 06:23 PM   #3
Registered User
Join Date: Mar 2010
Posts: 36
Default hey

Lets say u got 10 frames, so the last frame is number 10.
Just write,
on(release) {

Just put this code in a button.

or u could use:

Hope this helpes you out!
Zymiily is offline   Reply With Quote
Old 08-03-2010, 08:24 PM   #4
Senior Member
Join Date: Dec 2009
Location: New York
Posts: 188

Here I have 3 frames, 4 buttons. 3 buttons navigate to their frames respectively and the fourth to the last frame viewed.
ActionScript Code:
stop(); var lastViewed:int; frame1_btn.addEventListener(MouseEvent.CLICK, gotoFrame1); frame2_btn.addEventListener(MouseEvent.CLICK, gotoFrame2); frame3_btn.addEventListener(MouseEvent.CLICK, gotoFrame3); lastViewed_btn.addEventListener(MouseEvent.CLICK, lastView); function gotoFrame1(event:MouseEvent):void{     lastViewed = currentFrame;     trace(lastViewed);     gotoAndStop(1);     } function gotoFrame2(event:MouseEvent):void{     lastViewed = currentFrame;     trace(lastViewed);     gotoAndStop(2);     } function gotoFrame3(event:MouseEvent):void{     lastViewed = currentFrame;     trace(lastViewed);     gotoAndStop(3);     }     function lastView(event:MouseEvent):void{     switch(lastViewed){         case 1:         gotoAndStop(1);         break;                 case 2:         gotoAndStop(2);         break;                 case 3:         gotoAndStop(3);         break;         }     }
flashGeneral is offline   Reply With Quote
Old 08-07-2010, 03:03 AM   #5
Registered User
Join Date: Jan 2010
Posts: 32

Thanx guys, i'll go try 'em out!
Clayf700 is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:23 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.