Groups | Blog | Home
all groups > macromedia flash flash remoting > march 2004 >

macromedia flash flash remoting : Passing text from a DIV layer...is it possible?


JJR
3/30/2004 3:42:32 AM
I may be asking something impossible...

But, is it possible to pass the text from one part of a HTML file into a Flash
Movie? Like, from a DIV layer or a CSS class?

Thanks for any help you guys can give.

--Jerry
Pete
4/8/2004 3:01:06 PM
Yes, you use SetVariable on the OBJECT in JavaScript, and fscommand in
ActionScript.

In your HTML...

<object id="myswf"
classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'

etc..

<script language="JavaScript">
<!--
function passVar(args)
{
myswf.SetVariable("somePublicMemberVar", "Foo");
}
//-->
</script>

<script language="JavaScript" event="fscommand(param1, param2)" for="myswf">
myhtmlitem.value = "Result: " + param1 + "..." + param2;
</script>


In ActionScript:

var somePublicMemberVar;

function mysendtoHTMLThingy()
{
fscommand("ABC", 123);
}


[quoted text, click to view]

AddThis Social Bookmark Button