Moving Objects Library II

Download moveobectsjlib.zip file and unpack it with utility which supports long filenames WinZip will be perfect.

Upload moveobjectslib.js file to your server.
Geocitizens are welcome to use script directly from my directory by changing script SRC attribute in example below to "/SiliconValley/Lakes/8620/moveobjectslib/moveobjectslib.js"

Edit your HTML source with any TEXT editor like Notepad.exe and add lines which are  in bold blue in example below. Be sure that you place each on right place. First part must go between <head> and </head> tags. Second ( onUnload and onLoad handlers ) must be inside <BODY ... > tag. And last one must go just before </BODY> tag of HTML.
Don't use  HTML editors, in most cases they are too dumb to handle scripts correctly. use TEXT editors only. Most of complaints like "your script don't work" I receive from users who use FrontPage and Adobe PageMil. Be careful! FrontPage sometimes changes scripts so, that it works only in MIE and no more work in Netscape. So you think it works, but your visitors who use Netscape can have problems...
 
<html>
<head>
.........
<script src="moveobjectslib.js">
</script>
........
</head>

<body 
 onUnload="if(allChipsTimer) stopThemAll();"
 onLoad="runThemAll();"

 ............................
 .....Your HTML Goes here....
 ............................

<script>
 createStarChips( true,
       'ballon4.gif','page1.html',
       'ballon4.gif',null,
       'ballon4.gif','page2.html',
       'ballon4.gif',null);

 createRandomChips(false,
       'ballon4.gif','some.html',
       'ballon4.gif','moveobjectslib.zip',
       'ballon4.gif',null);

</script>
</body>
</html>
 

Customizing of script
There are 2 functions in above example which creates 2 different sorts objects, createStarChips function creates objects which moves from center of the screen, createRandomChips function creates randomly moving objects. Both function have first boolean  parameter which can be true or false, If true images will be resized while moving, if false images will always have the same original size. Note that Image rescaling is CPU time consuming process and large number of resizable objects will slow down browser.  Next to this parameter  pairs of  imageFileName and linkURL  follows.  One can specify as many pairs as needed. If you don't need to have image linked to URL, place null instead of link.

Support
Yes, I'm ready to help if you have any problems with my scripts. I'd prefere if you would ask this questions in my Help forum. And please, before asking, check above headlines, guess you would find the similar question already answered.


Copyright 1999, Virtual_Max's Cafe