|
Hi all,
I am new with Javascript.
Here`s a code that I don`t understand.
It is meant to do an image preload
This is the code :
var arySWFiles = new Array(4)
arySWFiles[0] = "/forum/intro.gif"
arySWFiles = "/forum/introp.gif"
for (i= 0; i<arySWFiles.length; i++) {
preLoad.src = arySWFiles
}
Since the data is preloaded to var preLoad.src.
Does it mean that the files is then preloaded into
the cache of the browser?
Regards,
Andrew
|
|
|
Thanks for the reponse Troy...
I am not having a bit of trouble.
I am trying to use the Image swap method,
but with swf flash files. Which is non the less
unsucessful.
eg.
<embed name="swfMain" src="/forum/intro.swf">
then
document["swfMain"].src = "/forum/product.swf"
When I try to do this. nothing happens...
any ideas?
Regards,
Andrew
|
|
|
Unfortunately, I`ve never worked with Flash or Shockwave yet. In fact, I`ve not done much with <embed>. Although it seems logical that you could swap out the src for an embed tag just like any other tag, perhaps this is not possible. Let`s hope some gurus will read this and respond with an accurate, thorough answer!
Try some basic troubleshooting, though. Does your same code work if you change the <embed> tag to an <img> tag and just try to swap a couple of .jpg or .gif files? Try to test so that the only difference between working and non-working is the <embed> tag instead of <img> tag. Good luck.
|
|
|
|
|
|
|
|
|
|