Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : Send a variable from .swf to java script


2asgard
4/7/2004 11:33:06 PM
My question is very simple I think. I just need to send one variable from one
button made in flash to a common java script outside the shockwave file. I
would like to analize and have the control in java script.
How can I do this?
Thank you for your response.
Also I'm leaving my email. [E=Text]cleyva@eurekasystemsinc.com[/E]
duuman
4/7/2004 11:52:59 PM
Laiverd.COM
4/8/2004 2:08:31 AM
Head tag:

<script language="JavaScript" type="text/JavaScript">
var myVar;
function setMyvar(val){
myVar = val;
alert(myVar);
}
</script>


Flash:
getURL("javascript:setMyvar('your value');");

Mind proper nesting of the quotes. Something like this should work.

John
--
----------------------------------------------------------------------------
-----------
RESOURCES
http://groups.google.com/advanced_group_search?hl=en&as_ugroup=*flash
----------------------------------------------------------------------------
-----------
TUTORIALS at
www.laiverd.com
Flash & PHP Emailform
Using textfiles in Flash
----------------------------------------------------------------------------
-----------

David Stiller
4/8/2004 10:48:57 AM
John, I'm with you all the way. This has always been easier than using
FSCommand.


David
stiller ( at ) quip ( dot ) net


[quoted text, click to view]

targetplanet
8/10/2004 4:19:07 PM
AddThis Social Bookmark Button