The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

That is because you have not defined the image within the document using the <img> tag. You have only defined it in your script. Also if you are using the same name in an <img> tag that you are using in the script such as "imageA" you will run into problems. What are you trying to accomplish?

its more tricky than that!!!!

Hi, this is my source code, I hope you understand it.
I really need to sort this one.......
I call on the Array r0 to l3, two at a time,
step 1 would be r0=t2, l0=t2
I need to take this t2, then put the 'r' or 'l' back in front of it to make rt2 and lt2 then to show the image that it represents.
thus the ('images/r'+[thisrt]+'.gif') shows the image when thisrt=rt2 or lt2
but ('r'+[thisrt]+'.src') or
r[thisrt].src or
'r'+[thisrt].src does not show the image
I hope you can help!!!!

still not working properly

Thanks Marco, but the == was a mistake, but I didn't want to write another message after to say so.
Andrew, I have only been learning javascript for 1 month, I think its going OK, still have alot to learn and haven't even started php or other server side scripts yet.
Could you check out the page at

I put it online as it was working on my computer, but there's a couple of problems.
The position:absolute numbers arn't working the same online as off, and while the program is working it is constantly downloading. I noticed another message about caching here and realised that mine was set on minimum. I uped it but there was no affect. I was thinking that maybe my loop isn't being given time to load the pictures and sounds, but when I decrease the speed its still constantly downloading.
I hope you can help because I really need to get on with the rest of my website!

why does it do this?

why does it keep trying to download the sound? once its got them surely it know what they are. They are big files sizes for small sounds, about 22k for half-second samples. I can use .wav and .wma, but .mp3 doesn't work with .base. Will .wma work with other browsers? I can get them down to 3k per sound.

working better now!!

I've now put a onoff function and named my Images(which I should have done first)
this gives the pictures time to load, and its working alot faster.
but it still tries to connect for the sounds.
How do I get round this?

sound=new Sound(),,,,such a thing? or is there something else that will work...
cheers for your helps!