# Javascript controlled video problem

**URL:** <https://forum.kirupa.com/t/javascript-controlled-video-problem/197106>\
**Category:** flash\
**Created:** [August 13, 2006, 11:17pm UTC](https://forum.kirupa.com/t/javascript-controlled-video-problem/197106 "2006-08-13T23:17:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hybrid9](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@hybrid9](https://forum.kirupa.com/u/hybrid9)\
**Post date:** [August 13, 2006, 11:17pm UTC](https://forum.kirupa.com/t/javascript-controlled-video-problem/197106/1 "2006-08-13T23:17:53Z")

</div>

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:

```auto
 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!

```auto
<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?

thanks for any help,  
~hybrid ![](http://gotoandlearn.com/forum/images/smiles/icon_confused.gif)
