Skip to main content
March 9, 2009
Answered

listing all the populated variables when a swf is loaded from an embed tag ?

  • March 9, 2009
  • 1 reply
  • 383 views
Hello,

well, everything is in the title, I've been wondering how I could possibily do this for some time now.
and all I tried or thought of went nowhere.

I'd like to list all the variables an html embed tag passes on to the swf file called, whatever they are named and how many there is.

<EMBED src="example.swf?var="varcontent",var2="var2content">

it's not life-threatening, but I hate using things that work when I have an idea for things that would work better x)
This topic has been closed for replies.
Correct answer
This may not be what you are looking for but... I could suggest using a for in loop ie;
for(var i in _root) {
trace(i);
trace(_root );
}
Then weeding out the stuff you already know about.

1 reply

Correct answer
March 9, 2009
This may not be what you are looking for but... I could suggest using a for in loop ie;
for(var i in _root) {
trace(i);
trace(_root );
}
Then weeding out the stuff you already know about.
March 10, 2009
thanks, I didn't think it would be this simple to list all var in _root.

the only issue remaining is the case where I have more than one url passed on to my swf file, and how to distinguish which one is the one to use, but that's not really feasible (and anyway I can't think of a case where more than one var would be passed to the swfs I work on, let alone populated with an url).