Page 1 of 1

Is it possible to pass variable to .swf file.

Posted: Mon Aug 05, 2002 2:35 pm
by mongkol
Has anyone have solution for this thing?
I would create dynamic flash form for receiving comment messages but I need to recive ID.
For example, my sysmtem have ID for each program.. when I click at any programs. It will bring up new window that have flash Form for send comment for that program.. That mean this form must be able to received ID variable that is passed from the first page. What should I do?.. Is it possible?...
Thank you in advance.
mongkol

Posted: Sun Sep 29, 2002 3:01 pm
by Gen-ik
You can read variables from an SWF file using JavaScript.

<script language=javascript">
ThisVar=document.TheFlashMovie.GetVariable('VariableName');
</script>


ThisVar is the variable that the read Flash variable will end up.

TheFlashMovie is the name (or id) of your Flash movie.

VariableName is the name of the variable in Flash you want to read.


Hope this helps!

Posted: Sun Sep 29, 2002 6:04 pm
by Gen-ik
..or use Setvariable("variable_name", "value"); to set a variable in an SWF movie.