Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Flash Actionscript 3, Javascript FlashVar Problem!
Closed Thread
Old 02-07-2009, 11:16 AM   #1 (permalink)
 
Newb Techie

Join Date: Jan 2008

Posts: 21

! Whitey ! is on a distinguished road

Question Flash Actionscript 3, Javascript FlashVar Problem!

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.
! Whitey ! is offline  
Old 02-07-2009, 09:45 PM   #2 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

Default Re: Flash Actionscript 3, Javascript FlashVar Problem!

Flashvalley - Flash tutorials - Mouse control and actionscript
office politics is offline  
Old 02-08-2009, 07:37 AM   #3 (permalink)
 
Newb Techie

Join Date: Jan 2008

Posts: 21

! Whitey ! is on a distinguished road

Default Re: Flash Actionscript 3, Javascript FlashVar Problem!

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
! Whitey ! is offline  
Old 02-16-2009, 07:52 PM   #4 (permalink)
 
Newb Techie

Join Date: Jan 2008

Posts: 21

! Whitey ! is on a distinguished road

Default Re: Flash Actionscript 3, Javascript FlashVar Problem!

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
! Whitey ! is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DW CS3 problem with flash music clip. MikeFuryXP Web Graphics, Design, Digital Images 1 01-14-2008 01:24 PM
Problem with 3D graphics mordi05 Windows Operating Systems and Software 6 12-10-2007 11:37 PM
I can't understand this problem (Flash) dhgunit Web Graphics, Design, Digital Images 4 10-12-2007 01:32 PM
Strange flash 8 problem. krazy_taco Windows Operating Systems and Software 0 10-07-2007 02:25 PM
Flash CS3 install problem nocscit Windows Operating Systems and Software 0 06-23-2007 10:35 AM