02-02-2012, 08:19 PM
|
#1
|
|
Registered User
Join Date: Dec 2011
Posts: 17
|
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
|
|
|
02-03-2012, 12:18 AM
|
#2
|
|
Prid - Outing
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,157
|
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
__________________
17 Years old boy, who loves the Computer Technology
|
|
|
02-03-2012, 01:14 PM
|
#3
|
|
Registered User
Join Date: Jan 2012
Posts: 31
|
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?
|
|
|
02-03-2012, 02:31 PM
|
#4
|
|
Prid - Outing
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,157
|
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
__________________
17 Years old boy, who loves the Computer Technology
|
|
|
02-09-2012, 12:23 PM
|
#5
|
|
Registered User
Join Date: Dec 2011
Posts: 17
|
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
|
|
|
02-09-2012, 10:40 PM
|
#6
|
|
Prid - Outing
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,157
|
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!
__________________
17 Years old boy, who loves the Computer Technology
|
|
|
02-10-2012, 04:33 PM
|
#7
|
|
Registered User
Join Date: Dec 2011
Posts: 17
|
Thanks!
This works perfectly!
Thank you
|
|
|
07-09-2012, 02:54 AM
|
#8
|
|
Registered User
Join Date: Jul 2012
Posts: 1
|
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?
|
|
|
07-10-2012, 12:58 PM
|
#9
|
|
Prid - Outing
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,157
|
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
__________________
17 Years old boy, who loves the Computer Technology
|
|
|
| Thread Tools |
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT. The time now is 07:35 AM.
///
|
|