| View previous topic :: View next topic |
| Author |
Message |
winglady Co-Pilot


Joined: 16 Sep 2003 Posts: 330 Location: Colorado 183 ants
|
Posted: Wed Dec 10, 2003 11:41 pm Post subject: Aarvarks and Anteaters |
|
|
(...signs I spend too much time on the internet...)
When Aaron introduced the "ants" program, I began wondering if he might be confusing Anteaters with Aarvarks. Well, I'm relieved to have learned that both creatures share a similar taste for ants and termites, although they are totally unrelated otherwise. Did you know that aarvarks hail from Africa, while anteaters are from the Americas?
By the way, Aaron, I get a kick out of the fashions and accessories that change on the 2 Aardvarks at the top of each web page. The programmer in me wants to know more about the software you use to create that effect!!  _________________ D. Winger - Colorado for Free
The Essential Guide to Great Sand Dunes
The TRAD Guide to Joshua Tree |
|
| Back to top |
|
 |
aaron Airport Manager


Joined: 09 Sep 2002 Posts: 6544 Location: Aardvarkland 8722 ants
|
Posted: Wed Dec 10, 2003 11:51 pm Post subject: Re: Aarvarks and Anteaters |
|
|
Oh yes, we enjoy our ants too!
| winglady wrote: | | By the way, Aaron, I get a kick out of the fashions and accessories that change on the 2 Aardvarks at the top of each web page. The programmer in me wants to know more about the software you use to create that effect!! |
From memory, that was done by Javascript - the top banner is made up of two images - one (let's call it A) is the aardvark on the left, and the other (let's call it B) butts up right next to it and makes up the bulk of the title as well as the aardvark on the right.
I forget exactly how many different images there are on the server, but let's imagine there's A1, A2, A3 and A4, as well as B1, B2 and B3, with the numbers representing slight variations on the image. The Javascript just calls one of the A images at random and one of the B images also, and hence the result.
If you'd like to see the aardvarks in a variety of other guises, have a look at the business and sport forums also!
Regards
Aaron _________________ Aardvark Map - custom maps for your site
Follow me on Twitter
Become an Aardvark fan on Facebook |
|
| Back to top |
|
 |
Trev Senior Pilot


Joined: 10 Sep 2002 Posts: 2284 Location: Cumbria, England, UK 2727 ants
|
Posted: Fri Dec 12, 2003 9:00 pm Post subject: Re: Aarvarks and Anteaters |
|
|
| winglady wrote: | By the way, Aaron, I get a kick out of the fashions and accessories that change on the 2 Aardvarks at the top of each web page. The programmer in me wants to know more about the software you use to create that effect!!  |
You know how long it took me to write, erm, "borrow" that code??
If you point your browser at:
http://www.aardvarktravel.net/random-banners.js that should give you the script involved. You may need to save the file as IE6 seems to have a fit if you try opening it.
There are default images for each side which are just the blank Aardvark's so you see something when the page is loading (and if Javascript is off), the HTML for which is below. As long as the images are called "myPicture" and "myPicture2" (as specified by the name= attribute below) they'll be replaced by the randomly selected image from that Javascript code.
| Code: | <img src="/random-headers/aardvark-left-8.gif" width="157" height="158" border="0" name="myPicture">
<img src="/random-headers/aardvark-right-10.gif" width="441" height="158" border="0" name="myPicture2"> |
Finally, if you look on the end of the BODY tag in the source code there are 2 onLoad statements which tell the browser to run that Javascript once the page has fully loaded.
Hopefully that makes sense...
Trev _________________ Has anyone tried to find the ultimate answer to "nothing"?
London Tourist Attractions Guide - UK Hotels with live availability
A Web site about Floccinaucinihilipilification & Metacognition |
|
| Back to top |
|
 |
winglady Co-Pilot


Joined: 16 Sep 2003 Posts: 330 Location: Colorado 183 ants
|
|
| Back to top |
|
 |
aaron Airport Manager


Joined: 09 Sep 2002 Posts: 6544 Location: Aardvarkland 8722 ants
|
|
| Back to top |
|
 |
|