# Can I control a MovieClip animation based on a NetStream event?

**URL:** <https://forum.kirupa.com/t/can-i-control-a-movieclip-animation-based-on-a-netstream-event/195202>\
**Category:** flash\
**Created:** [July 29, 2006, 4:21pm UTC](https://forum.kirupa.com/t/can-i-control-a-movieclip-animation-based-on-a-netstream-event/195202 "2006-07-29T16:21:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LittleFenris](https://avatars.discourse-cdn.com/v4/letter/l/b5ac83/32.png) [@LittleFenris](https://forum.kirupa.com/u/LittleFenris)\
**Post date:** [July 29, 2006, 4:21pm UTC](https://forum.kirupa.com/t/can-i-control-a-movieclip-animation-based-on-a-netstream-event/195202/1 "2006-07-29T16:21:25Z")

</div>

First off, here is the website I’m working on:

[http://www.littlefenris.com/RAMPSI/](http://www.littlefenris.com/RAMPSI/)

What I am trying to do is get the animation of the audio levels (red bars next to the power switch) to only happen while a video is actually playing (videos are in the video gallery section). I have the animation done and I can easily get it to start and stop based on pressing the play and stop buttons, but since they start and pause the video you would get instances where the video isn’t playing but the audio levels would be animated, which I don’t want.

Here is an example of the code in the play button (using NetConnection and NetStream to play the videos):

```auto
play_btn.onPress = function() {
	playSound.start();
	infoText_txt.text = "PLAY";
	**my_ns.pause(spotToPlay);**
};

```

The only way I can think to make it work exactly as I want it is to have Flash look to see if the video is actually playing or not and I can’t figure out how to do this or if its even possible using the NetStream command I am using to start and stop the videos.

Any help is much appreciated.
