# MediaPlayback Component and Preloader?

**URL:** <https://forum.kirupa.com/t/mediaplayback-component-and-preloader/185293>\
**Category:** flash\
**Created:** [April 12, 2006, 9:03am UTC](https://forum.kirupa.com/t/mediaplayback-component-and-preloader/185293 "2006-04-12T09:03:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amdhappy](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@amdhappy](https://forum.kirupa.com/u/amdhappy)\
**Post date:** [April 12, 2006, 9:03am UTC](https://forum.kirupa.com/t/mediaplayback-component-and-preloader/185293/1 "2006-04-12T09:03:01Z")

</div>

I can get both working seperately, but not together. I’m using the MediaPlayback component in Flash MX 2004 with a percentage preloader (actionscript below).

[SIZE=1]onClipEvent (enterFrame) {  
var bytes = \_root.getBytesTotal();  
var bytes\_loaded = \_root.getBytesLoaded();  
var percentageLoaded = bytes\_loaded/bytes;  
var myText = Math.round(percentageLoaded\*100);  
if (bytes\_loaded == bytes) {  
\_root.gotoAndPlay(2);  
this.kirupatxt = “movie loaded”;  
} else {  
\_root.gotoAndStop(1);  
this.kirupatxt = “loading (” + myText + “%)”;

```
}

```

}[/SIZE]

**How do I get the preloader to work with Flash Video (.flv)?**

Thanks

---

<div class="post-metadata">

**Author:** ![amdhappy](https://avatars.discourse-cdn.com/v4/letter/a/258eb7/32.png) [@amdhappy](https://forum.kirupa.com/u/amdhappy)\
**Post date:** [April 12, 2006, 5:00pm UTC](https://forum.kirupa.com/t/mediaplayback-component-and-preloader/185293/2 "2006-04-12T17:00:35Z")

</div>

Got it - [http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn\_19439](http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19439)

The mime types on IIS.
