I have the following code in my html page:
<script>
<!-- Flash image swap code
if (document.images){
img1= new Image(468,288);
img1.src="images/_placeholder.jpg";
img2= new Image(468,288);
img2.src="images/_placeholder_2.jpg";
img3= new Image(468,288);
img3.src="images/_placeholder_3.jpg";
img4= new Image(468,288);
img4.src="images/_placeholder_4.jpg";
}
function change(changingImage, newImage){
changingImage.src = newImage.src;
}
//-->
</script>
The image thats already there has an id tag “img1” a name “img1”
Then in my flash movie I have:
btn_02.onRelease = function (){
getURL("javascript:change(img1, img2)");
}
But nothing happens. Clearly ive assed up something somewhere. Any Ideas?
PS,
This is how the link should be in HTML:
<a href="#" onClick="change(img1, img2)">change to image 2</a>