Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Point to Point Animation

Status
Not open for further replies.

hannah3

Programmer
Jun 28, 2000
2
CA
I'm trying to create a point to point animation for Netscape where a graphic will 'bounce' back and forth on the screen. Can anyone help?  
 
Please be a bit more specific <br><br> <p>Unicorn11<br><a href=mailto:webmaster@tripmedia.com>webmaster@tripmedia.com</a><br><a href= > </a><br>Hi there it all likeminded fellows!!!!!!
 
do you mean you're trying to create an animated GIF graphic with a bouncing ball? <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
if you are talking about a regular repeated animation, get any software that'll create animated GIF and it'll work in any browser. <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
<br>&gt;it'll work in any browser. <br><br>um... exsqueeze me.... but that's not entirely accurate.<br><br>-pete<br>
 
ok, It'll work in <b>Almost</b> any browsers(the standards graphical ones at least) <p>Karl<br><a href=mailto:kb244@kb244.8m.com>kb244@kb244.8m.com</a><br><a href= </a><br>Experienced in : C++(both VC++ and Borland),VB1(dos) thru VB6, Delphi 3 pro, HTML, Visual InterDev 6(ASP(WebProgramming/Vbscript)<br>
 
Here's my code. I want the animation to stop at the starting point and 'bounce' back to the other point. As you can see on the 'bounce' back it just keep's going off the page. Thank's for any help you can give me!<br><br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;Example of Sliding Layers&lt;/title&gt;<br><br>&lt;script language=&quot;JavaScript&quot;&gt;<br><br>function moveLayer(lyr,xadder,yadder,xend,timer){<br>&nbsp;lyr.top += yadder<br>&nbsp;lyr.left += xadder<br>&nbsp;<br>&nbsp;if ((xadder &lt; 0) && (lyr.left &gt; xend)) {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTimeout('moveLayer(document.layers[&quot;'+lyr.name+'&quot;],'+xadder+','+yadder+','+xend+','+timer+')',timer)<br>&nbsp;&nbsp;}<br>else{<br>setTimeout('moveLayer(document.layers[&quot;'+lyr.name+'&quot;],4,4,30,20)',20)<br>}<br>}<br>&lt;/script&gt;<br><br>&lt;/head&gt;<br>&lt;body bgcolor=&quot;Black&quot; onload=&quot;moveLayer(document.layers['Image1'],-4,-4,4,20)&quot;&gt;<br>&lt;layer name=&quot;Layer1&quot; top=100 left=100 visibility=show&gt;<br>&lt;img src=&quot;Image1.jpg&quot; width=90 height=90 alt=&quot;Image1&quot;&gt;<br>&lt;/layer&gt;<br><br>&lt;/body&gt; <br>&lt;/html&gt;
 
Well if ur using dreamweaver 2+ then use time lines and give any animation to the layer so that you can use that in that manner then loop it so that it will go on playing <br><br> <p>Unicorn11<br><a href=mailto:webmaster@tripmedia.com>webmaster@tripmedia.com</a><br><a href= > </a><br>Hi there it all likeminded fellows!!!!!!
 
Unicorn11, uh? How did Dreamweaver get into this?<br><br>hannah3,<br><br>It appears that you have code to turn the direction around when you reach your left boundary but you don't have any to change direction back to the left when you hit the right boundary. So of course you need to add a test condition for that occurrence and begin sending -4 for 'xaddr' again like in your Body.onload code.<br><br>At least thats what I think I see in the code.<br><br>Good luck<br>-pete<br>
 
I'd have to support Unicorn11 on this one.<br><br>Dreamweaver 3 (what I'm using at the moment) makes animations like the one described fairly easy.<br><br>See Dreamweaver help - Timelines.<br><br>:)
 
I think I'm going to have to go with palbano on this one :eek:) if somebody with a question needs help with code, we can't just send them off to something that will make it for them... they don't learn anything that way.<br><br>But that's just me, the purist. I still use notepad... I have dreamweaver only because I got it for free, but I have yet to use it. I think these things are much more fun when you learn it yourself. <p>Liam Morley<br><a href=mailto:lmorley@wpi.edu>lmorley@wpi.edu</a><br><a href=] :: imotic :: website :: [</a><br>"light the deep, and bring silence to the world.<br>
light the world, and bring depth to the silence.
 
When u use dreamweaver and timelines you can take a layer as hannah3 has and then define a timeline ie at a given time if will go from here to here and will be visible from this path to this part or give a path for it to follow <br><br>Enjoy <p>Unicorn11<br><a href=mailto:webmaster@tripmedia.com>webmaster@tripmedia.com</a><br><a href= > </a><br>Hi there it all likeminded fellows!!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top