Bonjour,
J'ai trouvé sur le net un javascript qui permet de zoomez et dézoomer sur une image, je l'ai adapté pour le faire fonctionner avec un fichier FLASH, il fonctionne parfaitement sous IE et pas sous firefox ?
ERREUR: Erreur : whatcache.style has no properties
Fichier Source : [file:///C:/Documents%20and%20Settings/Administrateur/Bureau/test.htm file:///C:/Documents%20and%20Settings/Administrateur/Bureau/test.htm]
Ligne : 19
le code:
<html>
<HEAD>
<title>Cut&Paste Image zoom in/out</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript">
<!--
var zoomfactor=0.05
function zoomhelper(){
if (parseInt(whatcache.style.width)>10&&parseInt(whatcache.style.height)>10){
whatcache.style.width=parseInt(whatcache.style.width)+parseInt(whatcache.style.width)*zoomfactor*prefix
whatcache.style.height=parseInt(whatcache.style.height)+parseInt(whatcache.style.height)*zoomfactor*prefix
}
}
function zoom(originalW, originalH, what, state){
if (!document.all&&!document.getElementById)
return
whatcache=eval("document."+what)
prefix=(state=="in")? 1 : -1
if (whatcache.style.width==("")||state=="restore"){ -------------- ligne19
whatcache.style.width=originalW
whatcache.style.height=originalH
if (state=="restore")
return
}
else{
zoomhelper()
}
beginzoom=setInterval("zoomhelper()",100)
}
function clearzoom(){
if (window.beginzoom)
clearInterval(beginzoom)
}
//-->
</script>
</HEAD>
[# Zoom In] |
[# Normal] |
[# Zoom Out]
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="
http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" name="myimage" width="511" height="816">
</object>
</html>
merci de votre aide.