flash variable question
- Started
- Last post
- 4 Responses
- effeuelle
So, I have a movieclip (instance name: actions) on the stage with first keyframe leave blank and a stop action on it.
On the second keyframe in this clip I've placed a movieclip with this actions on itself:onClipEvent (load) {
if (variabile=info) {
_root.menu.portfolio.gotoAndPlay...
}
}So, the buttons of my menu should set the variables and my clip should read its.
I use this method:
on (release) {
_root.variable = ('info');
}
on (release) {
_root.actions.gotoAndPlay(2);
}That's don't work.
Where i'm wrong? my buttons don't send the variable to my clip, i think.
Someone can help?
thanks,
- lvl_130
trace your variable. then you know if it's being set or not.
- effeuelle0
that's the problem, i'm not able to send the variable to the clip how should read it....agghrr
- spiralstarez0
first off your conditional expression is set wrong.
if (variable = info)
is not the same as
if (variable == info)
where the second checks equality, the first sets the variable...
- xau0
You can pass variables to a swf file using 'flashvars'. Look that up.
Also, put all actionscript on first frame below the stop(); action.
Use OOP (Object Oriented Programming) and functions... at least use functions... and assign actions to objects on the stage through functions. If you have Flash MX, functions and OOP are native.
Read the Actionscript dictionary and look at sample files that came with Flash.
Good luck. I know it's all a little awkward at first. But don't give up or be frustrated. Even 'expert' Flash users get stumped and spend hours on the most ridiculous little details.
End of Line