0 Replies Latest reply on Mar 18, 2009 12:49 PM by loadVariables

    Opera returns wrong currentframe

    loadVariables
      hi

      actionscript 2.0

      When running this code in IE7, it works, it return the correct frameid. But when testing on Opera 9.x it only return 19. 19 isn't a keyframe in the flash movie. The keyframes are: 1, 10, 20, 30, 40, 50.. No matter what frame is used in the flash movie, it returns 19

      what's wrong with my code?

      here is my code
      <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase=" http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="960" height="108">
      <param id="Param1" name="movie" value="../Flash/test.swf" />
      <param name="allowScriptAccess" value="sameDomain" />
      <param name="allowFullScreen" value="false" />
      <param name="movie" value="../Flash/test.swf" />
      <param name="FlashVars" value="frameid=world" />
      <embed src="../Flash/test.swf" width="960" FlashVars="frameid=world" height="108" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage=" http://www.adobe.com/go/getflashplayer"></embed>
      </object>

      <body onload="getFrame()">
      <form id="form1" runat="server">
      <div>

      <script type="text/javascript">

      function getFrame(str) {
      var div=document.getElementById("LeftPanel")

      alert(str);
      if (str == "10")
      div.style.backgroundColor = "#0078ad";
      else if (str == "20")
      div.style.backgroundColor = "#d11140";
      else if (str == "30")
      div.style.backgroundColor = "#fdb813";
      else
      div.style.backgroundColor = "#0078ad";
      }

      </script>


      actionscript:
      import flash.external.ExternalInterface;
      var jsArgument:String = _level0._currentframe;
      ExternalInterface.call("getFrame", jsArgument);