Closed Thread Icon

Preserved Topic: More then one (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=7821" title="Pages that link to Preserved Topic: More then one (Page 1 of 1)" rel="nofollow" >Preserved Topic: More then one <span class="small">(Page 1 of 1)</span>\

 
Osaires
Paranoid (IV) Inmate

From: oslo, Norway
Insane since: Aug 2001

posted posted 08-30-2001 09:35

How is it possible to move more then one object at the same time, like this: http://www.ozones.com/crystal/





[This message has been edited by Osaires (edited 08-30-2001).]

mobrul
Bipolar (III) Inmate

From:
Insane since: Aug 2000

posted posted 08-30-2001 14:50
quote:
function run() {
count++;
for ( j = 0 ; j <= 9 ; j++ ) {
difftop[j] = Ypoint[j] - temptoplocation[j];
diffleft[j] = Xpoint[j] - templeftlocation[j];
temptoplocation[j] = temptoplocation[j] + difftop[j]/30;
templeftlocation[j] = templeftlocation[j] + diffleft[j]/30;
eval(layerstart+"a"+j+layerstyle+layerleft+" = templeftlocation["+j+"]");
eval(layerstart+"a"+j+layerstyle+layertop+" = temptoplocation["+j+"]"); }
setTimeout('run()', 10) }



This is part of Doc's code...this is what makes the balls orbit.
You can't make them move at 'exactly' the same time, but if within 1/1000 of a sec is good enough for you this will work.
Anyway, each ball is numbered, 0-9. In fact, without looking at any other parts of the code, we can see that the balls are named "a0,a1,a2,a3.....a9"
This script moves a'j', where 'j' is a number between, and inclusive of, 0 and 9.
Now, there are other parts of the code that control the movement, but this part is what controls moving all of the balls 'at the same time'.
It is the
for(j=0; j<=9; j++)
part that is important.
Get it??

mobrul

Bugimus
Maniac (V) Mad Scientist

From: New California
Insane since: Mar 2000

posted posted 08-30-2001 19:32

I wrote a demonstration page that has multiple copies or instances of the same object moving on the same page. Take a look at the source for some ideas. It works for NN4 and IE5.
http://bugimus.com/gurus/chaser_formation.html

Dark
Neurotic (0) Inmate
Newly admitted
posted posted 08-30-2001 20:32

Very nice bug! I've been trying to do somthing similar on my page, thanks!


&#0124; &#0124;The Question Remains&#0124; &#0124;

« BackwardsOnwards »

Show Forum Drop Down Menu