Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Go Back button 1

Status
Not open for further replies.

jefargrafx

Instructor
May 24, 2001
273
US
Have a navigation problem....

I have several scenes in my movie with buttons to move from one to another. What I wnat is a button to do is just go back to the pervious scene, like you could with javascript reguadless of which scene you came from.....

the goto
pervious scene is just passing the movie back to the pervious scene in the order of scenes.

any ideas?

thanks
Jeff
 
Worked up a simple test (4 one frame scenes) that seems to work! Did it with variables tests, using frame numbers (in this case only 4 frames)... Could probably get it to work with frame labels (at the beginning of each scene)... I'll clean it up a little and may post it later!
Now, before you ask, this will only work with the immediate previous scene to the one you're in, and not work (although using an history array, it probably could!) as a continuous back up button going back up to the very first scene you looked at!
If that's what you're looking for... This ain't what you're going to get!
mywink.gif
ldnewbie
 
What'd you need that for?
I'll send it to ya!
Don't want to spoil Luke's assignment!LOL
Only works with frame numbers now... Would have to work out a "label" version... Would be better!


mywink.gif
ldnewbie
 
just to have it..thats all..you never know..

off to bed..check ya later..
e.gif


carlsatterwhite@endangeredgraphics.com
 
just checked it out..simple..no less nice..but simple..

needless to say i would have had a while to think on that one..but i guess understanding the real problem is the first step..then the rest is easy..catch ya tomorrow..


luke a hint: variables....
e.gif


carlsatterwhite@endangeredgraphics.com
 
hey old, culd u send one 2 me ?
vituzz@rambler.ru
many thanks regards, vic
 
okay...

htat works..I think,

how ya do it

variables??

let me know
 
Guys,
Working on the "label" version... Which I guess would be better! Unless you only have 1 frame scenes. Otherwise, since you'll probably be using this from within mcs, Flash sees this as only one large scene, and you have to add the frames of each individual scene in order to get the right goto. In other words, if you want to go to scene 3, and your scene 1 is a 100 frames, scene 2 is 50 frames, then scene 3 is actually located at frame 151 (100+50+1).

Jefargrafx, you don't seem very enthusiastic...
Send me your address at oldnewbie@hotmail.com
And I will send you the .fla

Vituz, .fla on it's way!

mywink.gif
ldnewbie
 
very cool....works find to go back and forth,,,but can flash create and use a history in a movie.

so we could create a button to go back, and back and back just like a borwser window? For the matter a next button as well.

just wondering...

I don't think labels would sovle this?????

what ya'll think
jef
 
jefargrafx, i've got an idea: u (or whoever) might use javascript function where u wuld create an array of current visiting scenes & thy create smth very similar 2 history array
i told about javascript 'coz i kno it might be done there 7 i dont kno if i am able of creating arrays in flash.. regards, vic
 
Guys,
As I said in my first post, this wasn't done in the spirit of a back & forward button type of thing. I imagine it could probably be done using an history array, and yes Vituz you can use arrays in Flash, but what's the point?
Outside of a programming challenge (maybe Luke's next assignment!), don't really see how this could be useful in a movie navigation.
Was that your intent from the beginning Jeffrey?


mywink.gif
ldnewbie
 
sort of...

the plan is to allow the user to back back throguh a series of scenes from where they cam from.

it's only six scenes, I want to display the mvoie in a browers without toolbars or menu bar and only use navigation I provide in the movie. Kind of like a browser within a browser for the current movie at least.

But what we have will work by providing a "home" button

just thought the history idea would go the extra mile.

javascript would be a good way to go about it.....

anit Flash cool

 
Will look at the Flash side of it, when I have a few minutes! Not so good with java! Maybe Vituz can try something!
mywink.gif
ldnewbie
 
jefargrafx, old, i dont think u can use history: u c, u're loading dfrnt scenes in one swf file, that means (my opinion) that history's value stays unchanged (i've just checked it: its true :))
and the point is:
every time u're writin
/:previousframe=/:currentframe
u can do it the same way but:

first, we define an array

var Scenes=new Array()
var len=Scenes.length//array's length
var count=0//current statement in scenes array

then when user click on some button:

len=Scenes.length
Scenes[len]=this_scene_name
count++



& then, when back clicked:
_root.gotoAndPlay(Scenes[count-1])

& when forward clicked:
_root.gotoAndPlay(Scenes[count+1])


got the main idea? i bet all of u thought about it..

sorry, i've not checked it myself, just an idea, but i'm shure u guyz can modify it 2 flash scripting format & get it to work

regards, vic
 
History was in my mind, just a figure of speech! The point is to build something in Flash, like how history works or an Undo & Redo would.
Guess you laid down the basics of it... Remains to check it out in Flash, and see if we can fit 48 hours into a day! I'm running after time here!
Will try something on the weekend!
mywink.gif
ldnewbie
 
I'm with you on the weekend, got real work to get done.

I'll see what I can come up with tomorow.

stay tune, great idea.

thanks
 
Just finished the "label" version... If anyone interested!
mywink.gif
ldnewbie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top