# How to play embedded audio file with mediaplayback component

**URL:** <https://forum.kirupa.com/t/how-to-play-embedded-audio-file-with-mediaplayback-component/260531>\
**Category:** flash\
**Created:** [May 16, 2008, 3:03pm UTC](https://forum.kirupa.com/t/how-to-play-embedded-audio-file-with-mediaplayback-component/260531 "2008-05-16T15:03:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dellthx](https://avatars.discourse-cdn.com/v4/letter/d/e5b9ba/32.png) [@dellthx](https://forum.kirupa.com/u/dellthx)\
**Post date:** [May 16, 2008, 3:03pm UTC](https://forum.kirupa.com/t/how-to-play-embedded-audio-file-with-mediaplayback-component/260531/1 "2008-05-16T15:03:30Z")

</div>

Hi,

Is there anyway to play an audio file that is embedded in the swf that I am creating using the mediaPlayBack component. The reason I want to use the mediaPlayBack component is because it has the timer/progress bar showing how much of the file has already played. Currently im using this to play the audio file.

play.onRelease = function () {  
s = new Sound();  
s.attachSound(“audio”); //in the green, put the sound linkage id  
s.start(0,1);  
}  
stop.onRelease = function () {  
s.stop();  
}

But I dont know how to expanded upon his to include a timer/progress bar. Im not very good with actionscript. I can’t seem to find any tutorials that show how to create a timer/progress bar for any audio that uses “attachSound”. If someone can help me out with this I would really appreicate it.

Thank you,
