-
So here I am thinking i'm so clever by being able to change variables from javascript in a movie using:
movie.SetVariable("xxx",xxx);
no problem, right?
however, I can't seem to target movies that are loaded into the main movie (specified my embed)... or even movie clips for that matter.
movie.SetVariable("/_level0/xxx",xxx);
wont work.
Anybody have any ideas?
thanks.
-
You seem to be referencing the variable incorrectly. The syntax should look like such:
movie.SetVariable("/:xxx",xxx);
yours looked like this:
movie.SetVariable("/_level0/xxx",xxx);
I will explain a few small things about it. First, you can drop the '_level0/' part because using '/' refers to the same thing (the main movie timeline) by default. Second, when referencing a variable, you do the same as you would with a movie clip, except use a colon just before the variable name.
If I wanted to reference the variable X in level 4 I would do this:
movie.SetVariable("/_level4:xxx",xxx);
I hope this helps ya out.
patrick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|