Bonjour,

Je voudrais accéder à mon code actionscript depuis un appel javascript.
Voici mon code dans mon fichier spot.fla :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
this.image = "demis.JPG";
this.minx = "-180";
this.miny = "-90";
this.maxx = "180";
this.maxy = "90";
 
this.createEmptyMovieClip("map",0);
map.loadMovie(image);
 
this.setBBOX = function(xmin,ymin,xmax,ymax) {
	this.minx = xmin;
	this.miny = ymin;
	this.maxx = xmax;
	this.maxy = ymax;
}
et voici mon code html :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<HTML>
  <HEAD>
    <TITLE>Image</title>
	<SCRIPT>
	  function setBBOX()
      {
		window.document.spot.setBBOX("-90","-45","90","45");
      }
	</SCRIPT>
  </HEAD>
  <BODY>
    <input type="button" onClick="setBBOX()" value="setBBOX"/>
    <CENTER>
      <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="800" HEIGHT="400" id="spot">
        <PARAM NAME=movie VALUE="spot.swf">
        <PARAM NAME=quality VALUE=high>
        <PARAM NAME=bgcolor VALUE=#000000>
		<PARAM NAME="swliveconnect" VALUE="true">
        <EMBED src="spot.swf" quality=high bgcolor=#ffffff WIDTH="800" HEIGHT="400" NAME="spot" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" swliveconnect="true">
        </EMBED>
      </OBJECT>
    </CENTER>
  </BODY>
</HTML>
J'ai une erreur Javascript me disant que window.document.spot.setBBOX "is not a function"... pourtant s'en est bien une !

Merci de votre aide !

WwAve