A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Javascript controlled flv

  1. #1
    Junior Member
    Join Date
    Dec 2000
    Posts
    21

    Javascript controlled flv

    Hi...

    Ok, so I know how to control standard SWFs with javascript, I use the following code to do that, with a call to the stopFlash() function that passes in the name of the objectID or embedName of the SWF:

    Code:
    function getFlashMovieObject(movieName) {
      if (window.document[movieName])
      {
        return window.document[movieName];
      }
      if (navigator.appName.indexOf("Microsoft Internet")==-1)
      {
        if (document.embeds && document.embeds[movieName])
          return document.embeds[movieName];
      }
      else
      {
         return document.getElementById(movieName);
      }
    }
    
    function stopFlash(movieName) {
       getFlashMovieObject(movieName).StopPlay();
    }
    But the SWF I'm trying to stop is a streaming video that is located in a placeholder called playback.swf. I can't stop the stream/video. But I can replace the StopPlay() with Zoom(25) and that will work!

    Code:
    <param name="movie" value="movies/playback.swf?movie=soccer.flv" />
    What gives? How do I stop a streaming video when the param value is like this?

  2. #2
    Flashkit historian Frets's Avatar
    Join Date
    Oct 2000
    Location
    flashkit
    Posts
    8,797
    hi,

    js script communication pretty much died with swf5

    The most I can suggest is that you put a label in an mc where the action is called.

    Then call the label via .js

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center