View Full Version : Dynamic javascript parameter

10-12-2004, 03:39 PM
Hey, is there anyone who could help me with a difficult issue ( for me :) ).

I have a arrow as a graphic symbol, and i want to make it move up and down on the Y-axies. Unfortuantly i get the parameter that changes the value, from an dynamic Javascript query. Something like this:

var mCounter = "14";

It changes every time the user changes the value in a form, but not via an refresh on the htmlpage.

My question is:
- How can i take a dynamic value from a javascript into my .FLA

My best regards
Niels Kristiansen

10-12-2004, 07:09 PM
call this function when the button in the html-file is pressed:<script language="JavaScript">
function setVars(){
window.document.movie.SetVariable('someVar',mCount er);
window.document.getElementById('movie').SetVariabl e('someVar',mCounter);

then put something like this in the swf:// the coming 3 lines of code define the value for someVar in case the user hasn't inserted anything
if (_root.someVar == undefined){
_root.someVar = 14;
// the following line of code makes the object move on the Y-axis
someClip._y += _root.someVar;

- Ruben