PDA

View Full Version : setting variables inside a movie clip


anto_123
03-03-2003, 08:07 PM
i am having problems assigning values to variables that are situated inside a movie clip.
its something like this...

when i click a submit button in the main movie i want to assign a text box a value (text box called "score").
the text box is in a over state of a button in a different movie clip called "mc_rating".

i have the actionscript in the submit button and am address is the variable(score) this is what i have

set variable"/mc_rating:score" = value_entered_by_user

do i need to address the button as well, as the text button is in the button over state??

does it matter if the submit button is in frame fourty and the mc is in frame 10??

please help

Cragdo
03-03-2003, 10:53 PM
are you using flash mx?

Try

_root.mc_rating.score = _root.whatever-mc-you-have-this-in.value_entered_by_user;


Also is score the name or the variable of the text box? :D

anto_123
03-04-2003, 10:57 AM
no
Flash 4 :(

anto_123
03-04-2003, 11:01 AM
score is the name of the variable of the test box.

Ricod
03-05-2003, 05:13 PM
If I read it correct, score is the name of the variable which is in the mc mc_rating which is in the over frame of a button, correct ?

I think, if I remember correctly, you can't do this directly in Flash 4(you couldn't adress buttons then, if i remember correctly). I believe you had to give to value to a variable which you can access from anywhere (the main timeline for instance) and then from the mc, set the value of score to that of the variable on the main timeline.