2 Replies Latest reply on Jun 13, 2006 3:33 PM by jsprouletopia

    mouse X/Y coordinates: Javascript to Actionscript

    jsprouletopia
      Hello Everyone,

      I am taking a value from javascript and want to use it in actionscript. I know how to pass the value (mouse X/Y coordinates) in to a dynamic text box but am stumped when it comes to reading that value when it changes and then using the new value in actionscript.

      I would like to move an object’s (“ a car”) when the “X” value changes.

      So I have Source files.
      1. One is of a car that will move back and forth with the mouse, but only if the cursor is over the SWF. http://sprouletopia.com/CAR_CURSOR/1_carFILES/flashcarfile.html

      2. The second is html with JavaScript that will read in x/y and display it. http://sprouletopia.com/CAR_CURSOR/2_JAVASCRIPT_HTML_X/just_javascript.html

      3. The third is an example my attempt of getting the X in to a dynamic text box. Now I can do that but how do I reference the value of that text box and use it again in the Actionscript. http://sprouletopia.com/CAR_CURSOR/3_Java_swf_x_intoTEXT/javascriptX_to_SWF.html

      http://www.sprouletopia.com/CAR_CURSOR/Car.zip

      Can someone please take a look and help me with this?

      thank you,
      Jason
      :rolleyes: [