Hi,
I would like to start this variables issue, cause i have read a lot of posts with the same problem and all gives the same solution:no solution!
The problem is that sometimes we can't use the variables in the actionscript, we can use it directly in a dynamic text box, but not in actionscript.I think this problem appears when we call a var from a movieclip or from a external file(like .txt).
Have this happen to you??
If yes just tell us your situation and your solution too please ,if you have!!
I second that oldnewbie. It's probably a scope issue. If a var is called from a movieclip by a button on the main stage, it's scope is local to the movieclip and not the main stage unless it is declared first as global. Likewise if a var is called from a text file and loaded into a movieclip, the same will be true.
Just because you changed the code, doesn't mean it's yours
Ok
Here is an exemple, a simple one!
I created a movieclip(movieclip.swf) that is loaded in main.swf
movieclip.swf has a var called movie_clip_var
when movieclip is loaded you can put movie_clip_var in a dynamic text box with this code _root.stage1.movie_clip_var, but if you want to work it in the actionscript the output will be undefined!
Hope that this exemple ilustrates my issue.
Thanks
These are most probably MX2004 formated .flas... Can't open them. They would have to be saved as MX only format (use Save As and change the document format in the Save as window), so that we still on MX only, can open them.
Yes, that's true it works!
But you still can't use it in the main.swf actionscript.
if you wanted to add something to that var you couldn't, unless you do it in the movieclip.swf.
For exemple, this doesn't workin main.swf)
var_main=stage1.movie_clip_var+" ,declared in Main";