Go Premium for a chance to win a PS4. Enter to Win


how to move an image?

Posted on 2001-06-25
Medium Priority
Last Modified: 2010-08-05
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?
Question by:mikeandbee

Expert Comment

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

LVL 19

Accepted Solution

webwoman earned 400 total points
ID: 6225235
You'd have to set them up on layers/divs, and move them. For a good example and a lot of code you can copy, go to www.dansteinman.com/dynduo

Or check out www.htmlguru.com , he does similar things there.

Expert Comment

ID: 6225502
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:
<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.

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.


Expert Comment

ID: 6227698
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.


Expert Comment

ID: 6677799
Please award/close or advise what else is needed.
Community Support Moderator @ Experts Exchange

Expert Comment

ID: 6829387
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.
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.

------------>  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:

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.


Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month10 days, 9 hours left to enroll

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question