Basically I have 5 flash movies and 3 images and I want to show them randomly using dreamweaver… anybody knows how to do it?
Yeah, I do it this way…
function random_imglink(){
var myimages=new Array()
myimages[1]="image1.gif"
myimages[2]="image2.gif"
myimages[3]="image3.gif"
myimages[4]="image4.gif"
myimages[5]="image5.gif"
myimages[6]="image6.gif"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}
random_imglink()
</script>
Make the contents of myimages whatever pics or movies you want.
Do you know any good sites that i can learn advanced php in?
Kit,
thanks… but what I need is the combination of both flash and static image… any clue?
Just tweak that script a little. An if statement should cover it.
Say put the images in 1 - 5 and swfs in 6 - 8. Something like if the random number generated is 1 - 5 use a line of code with IMG SRC to place the pic, if it’s 6 - 8 then use a different line of code which is an EMBED for a swf.
why didnt I think of that?
will try that…
thanks Kit
oh have I told you I like your artworks?