473,322 Members | 1,494 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

mousedown, mouseup

mrdata
2
Hello all

I am trying to send 2 commands to my camera, cmovert and cmovest. cmovert will start continuous movement to the right. cmovest will issue a stop command.
I would like to have onmouseover and onmouseout change my img, onmousedown to issue the cmovert command and onmouseup to issue the
cmovest command. In other words, I would like the camera to move right until the mouse is released.
This is what I am using now...
************************************************** ************************************************** ******
Expand|Select|Wrap|Line Numbers
  1. <!--
  2. // PRELOADING IMAGES
  3. if (document.images) {
  4.  img2_on =new Image(); img2_on.src ="images/fingerrt2.gif"; img2_off=new Image(); img2_off.src="images/fingerrt1.gif";
  5. }
  6. function movr(k) {
  7.  if (document.images) 
  8.   eval('document.img'+k+'.src=img'+k+'_on.src');
  9. }
  10. function mout(k) {
  11.  if (document.images) 
  12.   eval('document.img'+k+'.src=img'+k+'_off.src');
  13. }
  14. //-->
  15.  
[HTML]<td align="left"><a href="http://doofus1.mine.nu:3417/cmd=cmovert" onMouseOver="movr(2);return true;"
onMouseOut="mout(2);return true;" onClick="return true;"><img name="img2" border="0"
width="48" height="27" alt="Move right" src="images/fingerrt1.gif"></a></td>[/HTML]
************************************************** ************************************************** *******
This will successfully change the image and issue the cmove commnd but there is no provision for the cmovest command.
I did some experimenting and tried this....
************************************************** ************************************************** *******
[HTML] <td align="left">
<a onmousedown="href='http://doofus1.mine.nu:3417/cmd=cmovert'" ;
a onmouseup="href='http://doofus1.mine.nu:3417/cmd=cmovest';return true;"
onMouseOver="movr(2);return true;"
onMouseOut="mout(2);return true;">
<img name="img2" border="0" width="48" height="27" alt="Move right" src="images/fingerrt1.gif"></a></td>
[/HTML]************************************************** ************************************************** **********
When I mousedown, I see on the status line...href='http://doofus1.mine.nu:3417/cmd=cmovert. If I mouseout and then mouseover again I

see...href='http://doofus1.mine.nu:3417/cmd=cmovest on the status line. After some further experimentation, I beleive that the

cmovest command is being issued but I have no evidence that cmovert was sent.
Any ideas how I can clean this up so that it works?
Any help would be appreciated.
Thanx
Sep 26 '07 #1
2 2248
dmjpro
2,476 2GB
Hello all

I am trying to send 2 commands to my camera, cmovert and cmovest. cmovert will start continuous movement to the right. cmovest will issue a stop command.
I would like to have onmouseover and onmouseout change my img, onmousedown to issue the cmovert command and onmouseup to issue the
cmovest command. In other words, I would like the camera to move right until the mouse is released.
This is what I am using now...
************************************************** ************************************************** ******
<!--
// PRELOADING IMAGES
if (document.images) {
img2_on =new Image(); img2_on.src ="images/fingerrt2.gif"; img2_off=new Image(); img2_off.src="images/fingerrt1.gif";
}
function movr(k) {
if (document.images)
eval('document.img'+k+'.src=img'+k+'_on.src');
}
function mout(k) {
if (document.images)
eval('document.img'+k+'.src=img'+k+'_off.src');
}
//-->
<td align="left"><a href="http://doofus1.mine.nu:3417/cmd=cmovert" onMouseOver="movr(2);return true;"
onMouseOut="mout(2);return true;" onClick="return true;"><img name="img2" border="0"
width="48" height="27" alt="Move right" src="images/fingerrt1.gif"></a></td>
************************************************** ************************************************** *******
This will successfully change the image and issue the cmove commnd but there is no provision for the cmovest command.
I did some experimenting and tried this....
************************************************** ************************************************** *******
<td align="left">
<a onmousedown="href='http://doofus1.mine.nu:3417/cmd=cmovert'" ;
a onmouseup="href='http://doofus1.mine.nu:3417/cmd=cmovest';return true;"
onMouseOver="movr(2);return true;"
onMouseOut="mout(2);return true;">
<img name="img2" border="0" width="48" height="27" alt="Move right" src="images/fingerrt1.gif"></a></td>
************************************************** ************************************************** **********
When I mousedown, I see on the status line...href='http://doofus1.mine.nu:3417/cmd=cmovert. If I mouseout and then mouseover again I

see...href='http://doofus1.mine.nu:3417/cmd=cmovest on the status line. After some further experimentation, I beleive that the

cmovest command is being issued but I have no evidence that cmovert was sent.
Any ideas how I can clean this up so that it works?
Any help would be appreciated.
Thanx
Welcome to TSDN :-)
Use Code tags while you do Post to make your problem clear.

Kind regards,
Dmjpro.
Sep 26 '07 #2
mrdata
2
Hello all

I am trying to send 2 commands to my camera, cmovert and cmovest. cmovert will start continuous movement to the right. cmovest will issue a stop command.
I would like to have onmouseover and onmouseout change my img, onmousedown to issue the cmovert command and onmouseup to issue the cmovest command. In other words, I would like the camera to move right until the mouse is released.
This is what I am using now...

Expand|Select|Wrap|Line Numbers
  1. <!--
  2. // PRELOADING IMAGES
  3. if (document.images) {
  4.  img2_on =new Image(); img2_on.src ="images/fingerrt2.gif"; img2_off=new Image(); img2_off.src="images/fingerrt1.gif";
  5. }
  6. function movr(k) {
  7.  if (document.images) 
  8.   eval('document.img'+k+'.src=img'+k+'_on.src');
  9. }
  10. function mout(k) {
  11.  if (document.images) 
  12.   eval('document.img'+k+'.src=img'+k+'_off.src');
  13. }
  14. //-->
  15.     <td align="left"><a href="http://doofus1.mine.nu:3417/cmd=cmovert" onMouseOver="movr(2);return true;"
  16.     onMouseOut="mout(2);return true;" onClick="return true;"><img name="img2" border="0"
  17.     width="48" height="27" alt="Move right" src="images/fingerrt1.gif"></a></td> 
This will successfully change the image and issue the cmove commnd but there is no provision for the cmovest command.
I did some experimenting and tried this....

Expand|Select|Wrap|Line Numbers
  1.     <td align="left">
  2.       <a onmousedown="href='http://doofus1.mine.nu:3417/cmd=cmovert'" ;
  3.        a onmouseup="href='http://doofus1.mine.nu:3417/cmd=cmovest';return true;"
  4.          onMouseOver="movr(2);return true;" 
  5.          onMouseOut="mout(2);return true;">
  6.       <img name="img2" border="0" width="48" height="27" alt="Move right" src="images/fingerrt1.gif"></a></td> 
When I mousedown, I see on the status line...
Expand|Select|Wrap|Line Numbers
  1. href='http://doofus1.mine.nu:3417/cmd=cmovert.
If I mouseout and then mouseover again I see...
Expand|Select|Wrap|Line Numbers
  1. href='http://doofus1.mine.nu:3417/cmd=cmovest
on the status line. After some further experimentation, I beleive that the cmovest command is being issued but I have no evidence that cmovert was sent.
Any ideas how I can clean this up so that it works?
Any help would be appreciated.
Thanx
Sep 26 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jeremy Robertson | last post by:
I'm working on an application that manages large image files (mulit-page ..Tiff's to be exact some 1000+ pages). I've written an user control that displays a number of the images as thumbnails...
4
by: Colin McGuire | last post by:
Hi again, thanks everyone for your previous help. But having resolved past problems, I'm moving on to new problems :( This one is a simple winforms application with two buttons, named Button1...
1
by: Alan | last post by:
i have a form with a label on it Private Sub Label1_mousedown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseDown ' do stuff End Sub ...
1
by: JDeats | last post by:
It appears the WinForm MouseDown and MouseUp event handlers are not working properly. In the "bare bones" sample application below, Form1_MouseUp gets called even through the mouse button remains...
2
by: charlieopenshaw | last post by:
I have a form listview and have used the MouseDown event to launch a modal dialog if a particular cell is clicked. This works fine but upon closing the dialog I am left with a dotted rectangle...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.