I was wondering how to update a variable created on a webpage using
javascript.
I define a variable with the same name in a flash movie on the same page....
Cant seem to get it working tho,
help is appreciated :)
Cheers,
Egid
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/2001
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 4/7/2001
function Update(varName){
ValueWanted = varName;
}
and call it as below adding your new value as a param
getUrl JavaScript:UpdateVar(new value)
Jon
egid <eg...@slowfire.com> wrote in message
news:9lgm72$7s9$1...@forums.macromedia.com...
getURL ("javascript:function_name('text');");
or
getURL ("javascript:function_name(var_name);");
from flash. I've never got it to work, the only thing you can pass stuff
into javascript that way are integers like:
getURL ("javascript:function_name(3);");
but you could do the following if you need to pass a string from flash to
javascript:
when your variable is updated in flash call the javascript function that
grabs it and puts it to use within the html page like so
1. update variable in flash and set in to a text box in the root level
2. (actionscript) getURL ("javascript:var_grab();");
3. (javascript)
function var_grab()
{
var x = name_of_movie.GetVariable("name_of_var_in_flash");
}
there may be other ways but this is the way that works best for me so far.
ciao.
-student of computer science
"Jon Newton-May" <j...@tnanet.com> wrote in message
news:9lgri6$l6b$1...@forums.macromedia.com...
Hi Egid:
The TechNote on passing variables is www.macromedia.com/go/14253, but it may
be failing because the particular browser you're using does not support
communication between browser and object. Information on supported features
by browser may be found in this TechNote:
www.macromedia.com/go/14159.
Sincerely,
Adam Burtch
Macromedia Tech Support