View Single Post
Old 12-31-2012, 01:17 AM   PM User | #1
MrTIMarshall
Regular Coder

 
Join Date: Nov 2010
Posts: 347
Thanks: 44
Thanked 1 Time in 1 Post
MrTIMarshall is an unknown quantity at this point
Question Record the MouseDown location, check witht eh MOuseUp location and if same show Menu

Hello Everyone,

I'm new still at Javascript and I'm trying to do something like this:

Code:
table.onmousedown {
      f_pos_x = //Set the First X Location
      f_pos_y = //Set the first Y location
});
table.onmousedown {
      s_pos_x = //Set the Second X Location
      s_pos_y = //Set the Second Y Location
      if ("f_pos_x" == "s_pos_x" && "f_pos_y" == "s_pos_y") {
            set_tab('new2_tabs', 'tile_options');
      });
});
I have a click and drag map, where as if they click on a tile, I would like the menu to show, but I was havign the problem where if you click and drag again this menu would change so I need to record the mousedown location and check with the mouse up location and if they are the same then show the new menu.

Best Regards,
Tim
MrTIMarshall is offline   Reply With Quote