Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 09-25-2005, 02:25 PM
  #1
Aqua-Beast
Novice (Level 1)
 
Aqua-Beast's Avatar
 
Join Date: Sep 2005
Posts: 7
iTrader: (0)
Aqua-Beast is an unknown quantity at this point
Moving images... Help plz.

Well I tyed a few diffrent scripts and non of them really work well and there very complecated and hard to customise...

I need a script that would have images moving from one point of a page to another. I dont want the images to be links or anything.. plz help.


(p.s. Thanks everyone, I have got a lot of help on this forum! )
Aqua-Beast is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 09-25-2005, 03:51 PM
  #2
birdbrain
Paladin (Level 15)
 
Join Date: Sep 2005
Location: I have a bijou perch
Posts: 314
iTrader: (0)
birdbrain is an unknown quantity at this point
Hi Aqua-Beast,

is this working example simple enough for you...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>move image</title>
<base href="http://achelous.mysite.wanadoo-members.co.uk/"/>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<meta name="Content-Script-Type" content="text/javascript"/>
<meta name="Content-Style-Type" content="text/css"/>
<style type="text/css">
<!--
body {
     background-color:#eef;
     color:#000;
 }
#image {
     position:absolute;
     top:0px;
     left:0px;
     width:160px;
     height:108px;
     line-height:108px;
     background-image:url(ball.gif);
     background-color:#eef;
     font-family:verdana,arial,hevetica,sans-serif;
     font-size:12px;
     color:#009;
     text-align:center;
 }
-->
</style>

<script type="text/javascript">
<!--
  var i=0;
  var speed=20;
function moveThis() {
     document.getElementById('image').style.left=i+'px';
     document.getElementById('image').style.top=i+'px';
  if(i<500) {
      i+=2;
setTimeout('moveThis()',speed);
  }
 }
//-->
</script>

</head>
<body>

<div id="image" onclick="moveThis()">click here</div>

</body>
</html>
I have used one image for this example but it can easily be modified for multiple images.

Last edited by birdbrain : 09-25-2005 at 04:00 PM.
birdbrain is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote

Reply
KEEP TABS
SPONSORS
 
Boxedart
 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 02:48 PM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.