Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-17-2010, 08:04 AM   PM User | #1
happymills
New to the CF scene

 
Join Date: Sep 2007
Location: Provo, Utah
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
happymills is on a distinguished road
Mouse events for canvas elements?

Is it possible to trigger mouse events with shapes drawn in an HTML5 canvas? I want to create a page with drawn elements that you can mouseover and pop up a dialogue box. I also want the shapes to react with some type of feedback. I'm hoping I can do this with javascript instead of Flash but haven't found a way to do it that's simple enough to make it worth it.
happymills is offline   Reply With Quote
Old 07-22-2010, 12:13 PM   PM User | #2
santhoshj400
Banned

 
Join Date: Jul 2010
Posts: 66
Thanks: 0
Thanked 1 Time in 1 Post
santhoshj400 is an unknown quantity at this point
Hi please try with this

function onMouseClick(e) {
var x = e.clientX;
var y = e.clientY;
}
var canvas = dojo.byId(canvasId);
dojo.connect(canvas,"click",onMouseClick);


Hope it helps

Thanks & Regards
Santhosh
santhoshj400 is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT +1. The time now is 01:54 AM.


Advertisement
Log in to turn off these ads.