Made to Order Software Corporation Logo

Get Variable

SWF Action
Action Category: 
Action Details: 
Action Identifier: 
Action Structure: 
Action Length: 
0 byte(s)
Action Stack: 
pop 1 (s), push 1 (a)
Action Operation: 
s1 := pop();
r := *s1;
Action Flash Version: 

Pop one string, search for a variable of that name, and push its value on the stack. This action first checks for local variables in the current function. If there isn't such a variable, or the execution is not in a function, then the corresponding global variable is read.

The variable name can include sprite names separated by slashes and finished by a colon as in. Only global variables are accessible in this way.



In this example, the variable named MyVar is queried from the sprite named Sprite2 which resides in Sprite1.

In a browser you can add variables at the end of the movie URL (as defined in the W3C docs) and these will automatically be accessible via this Get Variable action.



Defines the variable language and sets it to "jp".

Since Flash V5.x, there are internal variables available to you and these can be read with the Get Variable action.


Post new comment

The content of this field is kept private and will not be shown publicly.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.