PDA

View Full Version : Having variable problem(source included)


Persian-Rice
02-01-2003, 05:57 PM
Hey guys,

Im going to explain just a little before I tell you my problem.
ok I have these buttons and when you click them they set an mc to start playing at a a specific frame (slider), now when you click the link it also sends a variable with it into the same mc (slider).
while the new mc is playing on the stage at a certain frame based on an if statement checking for variables (depending on what button you clicked, because each one has it own variable)
it sends the main timeline to jump to a new frame and stop.

Ok here is the problem. when you click the button it sets the new mc to play, great, but the new mc doesnt seem to recognise that I sent it a variable and it wont move the main timeline to the new frame.

The if statment is in _root.slider at frame 12 (in main timeline on slider layer.
and buttons are on their own layers.

when you goto test movies it gives me a message, maybe you can figure it out, i cant, but thats cuz im an idiot at this point heh

what am i doing wrong????

Billy T
02-03-2003, 12:14 AM
your variable name of Button is the name as the identifier of the built in "Button object

change the variable to butClicked or something

also the variable value should be a string

"something";

cheers

Persian-Rice
02-03-2003, 05:43 AM
thnx alot,

I fixed those and made them into strings. and i got rid of the error that poped up, but now when I click on my button it still seems to do nothing
for example if you look at frame 31 on the main stage, thats whats supposed to show up when you click on "link" and frame 32 is supposed to show up when u click on "community". what am i doing wrong? for any one who hasent seen my origional post read it first to understand what im saying here.

ive also attached the revised version with the fixes to this reply.

Billy T
02-03-2003, 05:59 AM
if (butClicked == "links") {

need the ==

cheers