Why doesn't this work.  I have a button that should play my flash
video.  I don't get an error but the movie does not play.
I first register the object
    <script type="text/javascript" src="swfobject.js"></script>

    <script type="text/javascript">
swfobject.registerObject("myMovie", "9.0.0", "mediaplayer.swf");

        function videoplay() {
            alert("videoplay clicked.");
            try {
                var obj = swfobject.getObjectById("myMovie");

                if (obj) {
                    obj.Play(); // e.g. an external interface
call
                } else {
                    alert("Object Reference Failed.");
                }
            }
            catch (err) {
                alert("An error occurred.");
            }
            return;
        }


I also cannot retrieve other properties.  I am trying to get the
obj.currentFrame and obj.totalFrames, but each value is undefined.

        function videostop() {
            //nCurrentFrame = sobj.currentFrame;
           var obj = swfobject.getObjectById("myMovie");
            if (obj) {
                alert("Clicked Stop at Frame No.: " + obj.currentFrame
+ " of Total:" + obj.totalFrames );
                obj.StopPlay(); // e.g. an external interface call
            } else {
                alert("Object Reference Failed.");
            }

           return ;
        }

Just in case you need it, here is the object tag:

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
width="500" height="350" id="myMovie" name="myMovie">
        <param name="movie" value="mediaplayer.swf" />
      <param name="flashvars" value="file=movies/
Beth.flv&amp;image=images/Beth.jpg" />
      <!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="mediaplayer.swf"
width="100" height="75">
        <param name="scale" value="noscale" />
        <param name="allowfullscreen" value="true" />
        <param name="flashvars" value="file=movies/Beth.flv&amp;image=images/
Beth.jpg" />
<!--<![endif]-->

      <a href="http://www.adobe.com/go/getflashplayer";> <img
src="http://www.adobe.com/images/shared/download_buttons/
get_flash_player.gif" alt="Get Adobe Flash player" /> </a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
    </object>

Thanks for your help,
Russell
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SWFObject" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/swfobject?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to