Hi,
I have a simple yet perplexing question.
I am writting an action script getURL to pass a variable to an external Javascript function. Here is the simple version:
----- fuction -----
function myfunction(var1, var2)
{
document.write('This is var1' +var1 +'this is var2' +var2)
}
----- in Flash file ----
var1 = "hello"
var2 = "world"
getURL ("javascript:myfunction(var1, var2)"
I tried various syntax, but it doesn't want to work. If I hardcode string values, it is passed, but I can't get the variable to pass. And I am sure that the variable contains teh value.
I tried this syntax, but didn't work
getURL ("javascript:myfunction('" +var1 +',' +var2 +'""
Can anyone show me a working syntax to pass these varialbes?
Any help or suggestion would greatly be apprciated.
Thank you for your time
teekay
I have a simple yet perplexing question.
I am writting an action script getURL to pass a variable to an external Javascript function. Here is the simple version:
----- fuction -----
function myfunction(var1, var2)
{
document.write('This is var1' +var1 +'this is var2' +var2)
}
----- in Flash file ----
var1 = "hello"
var2 = "world"
getURL ("javascript:myfunction(var1, var2)"
I tried various syntax, but it doesn't want to work. If I hardcode string values, it is passed, but I can't get the variable to pass. And I am sure that the variable contains teh value.
I tried this syntax, but didn't work
getURL ("javascript:myfunction('" +var1 +',' +var2 +'""
Can anyone show me a working syntax to pass these varialbes?
Any help or suggestion would greatly be apprciated.
Thank you for your time
teekay