Flash Actionscript 3, Javascript FlashVar Problem!

Status
Not open for further replies.

! Whitey !

Baseband Member
Messages
23
Hi,

Can anyone help me?!

I would like to get the coordinates of the mouse movements into flash. The only way I can think of doing it is though javascript, then into the FlashVar param on the webpage and into Flash.

Sounds easy but I can't do it!!!

My flash movie is only 50px x 50px, so doing it in Flash isnt ok, because I want the coordinates of the mouse in the whole page.

I am not great at programming in either languages... yet!

So far I can set a variable in javascript and pass it though FlashVar into flash so that works fine, its just getting the coordinates values in!

This is my FlashVars code so far, but it doesnt work!

Code:
document.write("<param name=\"FlashVars\" value=mouseX=" + test1 + "&mouseY=" + test2 +" />");

Any help is much appreciated!

Thank you.
 
Thanks for the reply, but it isn't what I was looking for.

I can do that, but I want the flash movie to disply the mouse coordinates when the mouse isn't over the flash movie (as in anywhere on the page).

Thanks,

Dave
 
Does anyone else know how I can pass the coordinates of the mouse (cursor) on the whole webpage into Flash to have eyes that follow the mouse?

The flash movie is small in size and isn't the whole website!

Thanks,

Dave
 
Status
Not open for further replies.
Back
Top Bottom