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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GoTo frame lable frustration

Status
Not open for further replies.

ThomasJSmart

Programmer
Sep 16, 2002
634
This is realy anoying :(

its like this:

iv got a few scenes:

- main
- sub1
- sub2
- sub3

each scene has a framelable on the first frame with the name of the scene.

in main there's a button, when pressed the main scene playes from frame 2 to 10 and sets the variable _root.gopage to a scene name, (button1: _root.gopage = "sub1"; etc.)


now on frame 10 of the main scene i have a frame script.

this script should send the user to the appropriate scene based on the _root.gopage variable

iv tried the following:

gotoAndPlay(_root.gopage);
if i click sub1 it goes to sub2
if i click sub 2 it goes to the start of main

gotoAndPlay(_root.gopage,_root.gopage);
always sends me to sub1 no matter what i click

however gotoAndPlay("sub1","sub1"); seems to work fine
except i cant realy use this :(

any help much apreciated,

thanks,
Thomas Smart



I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
Are your buttons in a movie clip?

Can you post your .fla or a mockup?

Regards,

cubalibre2.gif

Bacon, eggs and sunshine are still good for me!
 
this is realy wyrd :(

iv made a copy of the fla file, without all the graphics and fancy buttons, just some black circles for buttons and the same scripting as the main fla.

and it works?!?!?!?

fla with graphics dont work
fla with graphics does work?!?

exactly the same setup, scripts and MC's

perhaps mx is still a tad buggy?


I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
aha!

this seems to work:

gotoAndPlay(eval(_root.gpage));

I learned a bit yesterday, today i learned a lot, imagine what i'll learn tomorrow!
 
fed up saying it....but if you will use scenes look out for unexpected problems



_______________________________________
You know you're old if you can remember when bacon, eggs and sunshine were good for you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top