i have a flash movie that calls a function in the html.. the function will set
a value in other flash movie also loaded in the html.
function SendVal(param){
window.document.GetInfo.SetVariable("val",param);
}
this function works well in a PC using IE, but on MAC browser's seem's that
SetVariable is invalid.
does anyone knows a substitute function that i can use in an html object, for
setting a value in a var inside a flash movie trough javascript? thnks
this is probably because window.document.GetInfo is null on the Mac.
You would need to do something like the following:
var myMovie = document.getElementById("GetInfo");
if (myMovie != null){
myMovie.SetVariable("val",param);
}

Signature
Jim Fee
Viking Electronic Services
jfee (at) vikinges (dot) com
>i have a flash movie that calls a function in the html.. the function will
>set
[quoted text clipped - 10 lines]
> for
> setting a value in a var inside a flash movie trough javascript? thnks
kaeptn-q - 25 Apr 2005 18:41 GMT
Hi.
I?m trying to figure out the same thing all the day now it does not work with
both of the mentioned ways.
This problem with javascript occurs in several forums, but nobody seems to
have solution to this. even the example in the regarding technotes do not work
on mac.
IE produces an error message like "object doesn?t support method", but that
also doesnt help. i think that the flash-player-plugin should somehow extend
the methods of the object-object, but doesn?t do so.
frustrating...
tom
Cesar Mascarenhas - 29 Apr 2005 13:58 GMT
Sorry for the terrible english! I'm a Brazilian!
Try to make de function reload de swf file with the variable!!
like this:
Function reloadWithVariable(param){
document.getElementById("swf id here").src =
"swf_file.swf?variablename="+param;
}
works fine for me!
:-)
gaming2day - 05 Jun 2005 09:52 GMT
To pass dates into a .swf file I use this javascript and it works fine:
function flashDate() {
var now = new Date()
window.document.getElementById("calendar").SetVariable("myday",
now.getDate() );
window.document.getElementById("calendar").SetVariable("myorigmonth",
now.getMonth() );
window.document.getElementById("calendar").SetVariable("myyear",
now.getFullYear() );
window.document.getElementById("calendar").SetVariable("fromscript", 1); }
However, it does not work for netscape/mozilla. I've tried alternative such as:
document.getElementById("calendar").src="calendar.swf?myday="+mydate;
and
window.document.calendar.SetVariable("myday", mydate);
but no luck.
any ideas?