Link to home
Start Free TrialLog in
Avatar of mikeandbee
mikeandbee

asked on

how to move an image?

Does anyone have a reference or idea how i could move images over the length of a graphic, say using a combo of asp and dhtml?

say i have a static graphic with a width of 500 pixels which representsd th elenght of a course. then, i have two small images (2 people) whose positions are updated every 2 minutes or so, citing the distance that they are from the end of the course.
The length of the course would be the width of the image.
The position the person relative to the course would be the distance they are from the end of the course. With every update, the image should position itself closer to the finish of the course graphic. Can this be done? how?
Avatar of nesifa
nesifa

yes, by the properties of the image. I will get back to this qyestion later because I am busy right now.

Nesifa
ASKER CERTIFIED SOLUTION
Avatar of webwoman
webwoman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The above comments were not very precise...you wanna set up two layers like in the code below

<div id="BACKGROUNDLAYER" style="position:absolute; width:479px; height:222px; z-index:1; left: 302px; top: 59px">
<div id="PEOPLELAYER" style="position:absolute; width:16px; height:54px; z-index:1; top: 11px; left:
<%=NEWPOSISTION %>px">
<img src="YOUR PEOPLE IMAGE" width="26" height="22"></div>
  <img src="YOUR BACKGROUND IMAGE" width="300" Height="161"> </div>

Everytime you want the people to move, just increase(or decrease) the amount of the variable NEWPOSITION

place your images in the corresponding layers, tweak the sizes and initial positions and you are all set.

you can also change the top position with another variable to adjust up and down.



The above comment works, but for each change you have to go to web server and come back. A lot of round trips go back and forth which are not likely in web design. The best solution is to do everything in client side script.You could change properties left and top of the image. The sample that webwoman gives you is a very good orientation.I do not have time to work on this sample, but by changing the properties of the image you could do the one that you need.

Nesifa
Please award/close or advise what else is needed.
Moondancer
Community Support Moderator @ Experts Exchange
This question appears to have been abandoned, all your open questions are posted below.
Your options are:
1.  Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3.  Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4.  Delete the question. Again, you must tell the other participants why you wish to do this.
For special handling needs, please post a zero point question in the link below, include the question QID/link.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click this Help Desk link for Member Guidelines, Member Agreement and the Question/Answer process:  Click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues.
https://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  EXPERTS:
 
Please leave any comments regarding this question here on closing recommendations if this item remains inactive another three days.
 
Thank you everyone.

Open Qs:
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11677198
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20136244
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20138104
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20139384
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20141051
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20141266
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20147138
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20175597
https://www.experts-exchange.com/jsp/qShow.jsp?qid=11188236

Moondancer
Moderator @ Experts Exchange
 
P.S.  For year 2000 question, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.