#1 2006-08-13 02:29:44

typon
New member
Ranking
Registered: 2006-08-13
Posts: 2
Expertise

Mouse movement not working in Firefox

So I'm working on a breakout game, and this is a test I found online and I did some editing in it. The red square should follow the cursor, and it does in Safari and IE, but it doesn't in Firefox. Any clue what has to be done to make it work?

Thanks
Typon

Offline

 

#2 2006-08-14 01:08:16

cyrus
New member
Ranking
Registered: 2006-08-14
Posts: 6
Expertise

Re: Mouse movement not working in Firefox

Your code is hard to read. Do you have to have it all in such long lines?

Consider using variables to store references to html elements, so you don't repeat your code again and again.

You are using IE only properties, such as posLeft. Use the top and left properties instead. They will return a String though, so you need to use parseInt to cast to a Number.

Offline

 

Board footer

OPML feedsRSS feeds



Powered by WWWThreads Forum
© Copyright 2006, WWWThreads