Tuesday, September 18, 2007

Back to JavaScript

OK I think I have gotten all of the save the whales and liberal heart bleeding out of my system for a while phew..

For a little while now I have been learning the basics of javascript, although since Uni has started I have petty much left it alone as I have been too busy with trying to learn some networking and Windows XP fundamentals.


This last weekend I took the time to spend a little while studying JavaScript again, and it was really fun, I want to make sure that I do not leave so long till the next time so I figured I would throw something random up here, of course only just having started out it is a bit hard to Incorporate code into the Blog because there are restrictions on what you can upload and I have to access my images thru an external site( photobucket) but meh! it is all practice I suppose.



If you click on the above image than you will see a slide show of some of the images that I took when I went to the Territory wildlife park( a great place that I will probably blog about when I am of a more cheery disposition)

There are a few options that I have been playing around with in this script, one of them was to get the image to move randomly around the screen, I was surprised how easy this was to achive, but at the moment I think I will leave it as it is, although I will probably add a preload, tat shuold helo the images to load a bit more smoothly.

This little bit of code has been a really good learninig experince beacuse when I was first trying to set this up it just refused to work, and I quickly jumped to the wrong conclusion assuming that Blogger was somehow to blame, I tried all sorts of thinks in the Blogger HTML, but all to no avail, then thankfully I went back and had another look at the javascript code and there was an extra quote mark in the setTimeout() method, Doh!

So I guess that next time I will do the logical thinkg and scan the code very carefullly before I go off trying to find other reasons why the code does not work, but, yeah overall now that it is working I am happy with it and look foward to the next bit of javascript that I throw up amnd have a play with but it could be a litttle while as I have a lot of reading to do.

No comments: