all groups > flash (macromedia) > august 2006 >
You're in the

flash (macromedia)

group:

Passing Variables


Passing Variables Chaz03
8/25/2006 8:43:59 PM
flash (macromedia):
Ok, I have looked around and there seems to be a pretty decent amount of info
on this subject, but I can't get any of it to work out. I have 9 buttons in my
SWF that trigger rollOvers and when clicked open hyperlinks. I now have set
variables at the beginning of the movie so that they might be able to be
changed from outside of the flash through JavaScript or an HTML query string.
I have set my variables in frame 1 in the Actions layer all of these ways:

set(myVar,"http://www.mysite.com");
set(_global.myVar,"http://www.mysite.com");
_global.myVar = "http://www.mysite.com";
myVar = "http://www.mysite.com";

None of these seem to be able to be changed by using "FlashVars", JavaScript
or any other method. Through different trials I believe that I have narrowed
it down to how my variables are declared.

Please and Thank You for any help
Re: Passing Variables Chaz03
8/25/2006 9:32:02 PM
Dont' worry about it...I got it.

variables passed in are at the '_root' level. So...
I used this version to declare my variables: set(myVar,
"http://www.mysite.com");
The answer was adding '_root.' to my getUrl():

on (release) { getUrl(_root.myVar,"_self")}

In case anyone else has a similar problem.
AddThis Social Bookmark Button