Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 02-02-2012, 08:19 PM   #1
babrems
Registered User
 
Join Date: Dec 2011
Posts: 17
Question Back button that is not sequential frame

Please help.

I have a button that needs to goes back to the last frame.
But the user can get to each frame in different configuations
so back is not a sequential frame.
Is there a way to go to the last frame that was accessed?

Thanks
babrems is offline   Reply With Quote
Old 02-03-2012, 12:18 AM   #2
Prid
Prid - Outing
 
Prid's Avatar
 
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,191
Send a message via MSN to Prid Send a message via Skype™ to Prid
Default

For button that leads to another frame, save the frame they went to in a variable, and when BACK button is pressed, go to the frame saved inside the variable
__________________
I have returned, and am now 18
Prid is offline   Reply With Quote
Old 02-03-2012, 01:14 PM   #3
Nick_McCoy
Registered User
 
Join Date: Jan 2012
Posts: 31
Default

Hey prid, that should get u back only one space.. What if u wanna make back button to take u back further? I know u can declare multiple vars, or different mcs on each frame, but u know how to do it using lesser vars?
Nick_McCoy is offline   Reply With Quote
Old 02-03-2012, 02:31 PM   #4
Prid
Prid - Outing
 
Prid's Avatar
 
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,191
Send a message via MSN to Prid Send a message via Skype™ to Prid
Default

you declare a variable on the current level, for instance at _root, and you know that _root is also actually a movieclip? so the once declared variable will be available throughout the whole lever, in this case, throughout all the levels at _root, so for every button that would lead to another frame, you'd simply save the frame the button leads, in that variable
__________________
I have returned, and am now 18
Prid is offline   Reply With Quote
Old 02-09-2012, 12:23 PM   #5
babrems
Registered User
 
Join Date: Dec 2011
Posts: 17
Question Example Please

Prid

Can you please show an example how to
save the frame they went to in a variable, and when BACK button is pressed, go to the frame saved inside the variable.

Im still new and do not understand how to save the frame.

Thanks
babrems is offline   Reply With Quote
Old 02-09-2012, 10:40 PM   #6
Prid
Prid - Outing
 
Prid's Avatar
 
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,191
Send a message via MSN to Prid Send a message via Skype™ to Prid
Default

I had to use an Array to store all the frame jumps made instead of a single variable, 'cause that would only store one step back, and not multiple. DOWNLOAD EXAMPLE FILE

Hope it works

The onLoad function in the first frame HAS to be in the first frame of your flash file, otherwise it won't be executed!
__________________
I have returned, and am now 18
Prid is offline   Reply With Quote
Old 02-10-2012, 04:33 PM   #7
babrems
Registered User
 
Join Date: Dec 2011
Posts: 17
Thumbs up Thanks!

This works perfectly!

Thank you
babrems is offline   Reply With Quote
Old 07-09-2012, 02:54 AM   #8
dadad
Registered User
 
Join Date: Jul 2012
Posts: 1
Red face previous frames with sounds overlapping (flash cs3, AS2.0)

Dear Prid, what if there is a sound in each frames? i'm working on e-storybook for kids. i've tried : on(release){ stopAllSounds(); prevFrame(); }. the button does take user to go to previous frames but the sounds goes overlapping. i then tried your codes but the same thing occur. could you please help me with this?
dadad is offline   Reply With Quote
Old 07-10-2012, 12:58 PM   #9
Prid
Prid - Outing
 
Prid's Avatar
 
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,191
Send a message via MSN to Prid Send a message via Skype™ to Prid
Default

Hi,

Would it be possible for you to post your FLA file, 'cause it's hard to tell without it. Just upload it at TinyUpload, and post the link here WITHOUT http://www. because you don't have enough posts to post real links
__________________
I have returned, and am now 18
Prid is offline   Reply With Quote
Reply


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 06:49 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.