title: How can i get total number of frames in swf file?
body: <blockquote>
  <p>i convert ppt to swf format, so i need to find total number of frames in that swf file, how to get it? and how to go the last frame of the given swf file?.</p>
  <p>example: here i given the source code for goto provious and next frame,but still i didn't get first frame, how can i get it? is there any solution guide me...</p>
  <p><strong>here How can i get total number of frames?</strong> Please explain berifly... thanks in advance..</p>
  </blockquote>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script language=&quot;JavaScript&quot;&gt;
  
  function getFlashMovieObject(myFlashMovie)
  {
  if (window.document[myFlashMovie]) 
  {
  return window.document[myFlashMovie];
  }
  if (navigator.appName.indexOf(&quot;Microsoft Internet&quot;)==-1)
  {
  if (document.embeds &amp;&amp; document.embeds[myFlashMovie])
    return document.embeds[myFlashMovie]; 
  }
  else // if (navigator.appName.indexOf(&quot;Microsoft Internet&quot;)!=-1)
  {
  return document.getElementById(movieName);
  }
  }
  
  //for Previous frame.....
  function PrevFrameFlashMovie()
  { 
  var flashMovie=getFlashMovieObject(&quot;myFlashMovie&quot;);
  var currentFrame=flashMovie.TGetProperty(&quot;/&quot;,4);
  var nextFrame=parseInt(currentFrame);
  var prevfram =nextFrame-4;
  flashMovie.GotoFrame(prevfram);
  flashMovie.Play();
  }
  
  //for Next frame.....
  function PlayFlashMovie()
  {
  var flashMovie=getFlashMovieObject(&quot;myFlashMovie&quot;);
  flashMovie.Play();
  //embed.nativeProperty.anotherNativeMethod();
  }
  
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;OBJECT classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; WIDTH=&quot;595&quot; HEIGHT=&quot;460&quot; id=&quot;myFlashMovie&quot; style=&quot;background:#fff;&quot;&gt;
  &lt;PARAM NAME=movie VALUE=&quot;/file.swf&quot;&gt;&lt;PARAM NAME=quality VALUE=autolow &gt;
  
  &lt;EMBED src=&quot;/file.swf&quot; quality=&quot;autolow&quot; wmode=&quot;transparent&quot;  autoplay=&quot;false&quot; WIDTH=&quot;595&quot; HEIGHT=&quot;460&quot; NAME=&quot;myFlashMovie&quot; ALIGN=&quot;middle&quot; TYPE=&quot;application/x-shockwave-flash&quot; PLUGINSPAGE=&quot;http://www.macromedia.com/go/getflashplayer&quot; style=&quot;background: none repeat scroll 0 0 #FFFFFF;&quot;&gt;&lt;/EMBED&gt;
  &lt;PARAM NAME=wmode VALUE=transparent&gt;&lt;param name=&quot;allowScriptAccess&quot; value=&quot;sameDomain&quot;/&gt;     &lt;param value=&quot;false&quot; name=&quot;autoplay&quot; /&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;True&quot; /&gt;
  
  &lt;/OBJECT&gt;
  
  
  
  
  &lt;input type=&quot;button&quot; onClick=&quot;PrevFrameFlashMovie();&quot; value=&quot;PreviousFrame&quot; name=&quot;Previous&quot;&gt; 
  
  &lt;input type=&quot;button&quot; onclick=&quot;PlayFlashMovie();&quot; name=&quot;Play&quot; value=&quot;NextFrame &gt;&gt;&quot;&gt; 
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>