PDA

View Full Version : Passing variables via javascript in netscape


3waytie4last
01-07-2002, 05:37 AM
my file works fine in ie (of course), and the flash 5 swf works fine in netscape, except for the variables passing. basically i'm clicking buttons through html to set color properties in a flash file.

here's the javascript and link code (taken from macromedia and slightly modified), any idea why netscape won't send/receive the variables.

*****************

<SCRIPT LANGUAGE=JavaScript>
<!--

function doPassVar(args){
var sendVar = args.value;
window.document.myFlash.SetVariable("myVar", sendVar);
}
//-->
</SCRIPT>

<a href="#" name="sendVar" value="blue" onClick="doPassVar(this)">

*****************

do i need netscape version checking code, or am i missing some ie/nn DOM issues or something?

thanks lots.

3waytie4last
01-07-2002, 06:30 PM
solved this myself, if you're interested, just send the variable in the "onclick" event (e.g.,<a href="#" name="sendVar" onClick="window.document.myFlash.SetVariable('myVar','blue' )">), rather than calling to a function.

note: javascript and flash do not communicate in mac ie5