# Media Controller Component

**URL:** <https://forum.kirupa.com/t/media-controller-component/110351>\
**Category:** Uncategorized\
**Created:** [May 14, 2004, 10:47pm UTC](https://forum.kirupa.com/t/media-controller-component/110351 "2004-05-14T22:47:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![pickkill](https://avatars.discourse-cdn.com/v4/letter/p/6a8cbe/32.png) [@pickkill](https://forum.kirupa.com/u/pickkill)\
**Post date:** [May 14, 2004, 10:47pm UTC](https://forum.kirupa.com/t/media-controller-component/110351/1 "2004-05-14T22:47:14Z")

</div>

Can anyone instruct me on coding this component to work. I want it to be able to load songs from a web source, and play them. If someone could post the action script, that would be great thanks!!

---

<div class="post-metadata">

**Author:** ![robster16](https://avatars.discourse-cdn.com/v4/letter/r/278dde/32.png) [@robster16](https://forum.kirupa.com/u/robster16)\
**Post date:** [August 7, 2004, 5:22pm UTC](https://forum.kirupa.com/t/media-controller-component/110351/2 "2004-08-07T17:22:51Z")

</div>

same problem here, nobody anywhere seems to explain how to be able to stream multiple mp3’s in this component, and not in one website I can find a tutorial I can understand about making my own mp3 player that streams mp3’s, so I’ll just skip it entirely… grrrr

---

<div class="post-metadata">

**Author:** ![scotty](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@scotty](https://forum.kirupa.com/u/scotty)\
**Post date:** [August 8, 2004, 7:28am UTC](https://forum.kirupa.com/t/media-controller-component/110351/3 "2004-08-08T07:28:25Z")

</div>

big V productions;)  
[http://www.kirupaforum.com/forums/showthread.php?t=58641](http://www.kirupaforum.com/forums/showthread.php?t=58641)  
[http://www.kirupaforum.com/forums/showthread.php?t=49368](http://www.kirupaforum.com/forums/showthread.php?t=49368)

scotty(-:

---

<div class="post-metadata">

**Author:** ![lastchance](https://avatars.discourse-cdn.com/v4/letter/l/f04885/32.png) [@lastchance](https://forum.kirupa.com/u/lastchance)\
**Post date:** [August 8, 2004, 11:48am UTC](https://forum.kirupa.com/t/media-controller-component/110351/4 "2004-08-08T11:48:44Z")

</div>

ok here we go.

To set media for the media player to play (tounge twister :P) you need the following action script.

```auto
 
myMediaPlayer.setMedia("myVideo.flv", "FLV");
//or.....
myMediaPlayer.setMedia("mySong.mp3", "MP3");
 

```

once the media is loaded into the component you will want to be able to control it. This is done easily with

```auto

myMediaPlayer.play()
//or....
myMediaPlayer.stop()
//or....
myMediaPlayer.pause()
//etc....

```

for things like volume control, a listener is required. heres an example.

```auto

var myListener:Object = new Object()
myListener.volume = function(){
  //actions
}
myMediaPlayer.addEventListener("volume", myListener);

```

in the previous code, “myListener” is set up to react to volume changes in the myMediaPlayer instance.

Hope this helps some 😛
