# Feeding contentPath to a mediaPlayback component

**URL:** <https://forum.kirupa.com/t/feeding-contentpath-to-a-mediaplayback-component/216757>\
**Category:** Uncategorized\
**Created:** [February 20, 2007, 10:50am UTC](https://forum.kirupa.com/t/feeding-contentpath-to-a-mediaplayback-component/216757 "2007-02-20T10:50:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Binji](https://avatars.discourse-cdn.com/v4/letter/b/cdc98d/32.png) [@Binji](https://forum.kirupa.com/u/Binji)\
**Post date:** [February 20, 2007, 10:50am UTC](https://forum.kirupa.com/t/feeding-contentpath-to-a-mediaplayback-component/216757/1 "2007-02-20T10:50:45Z")

</div>

Well here is my idea: i have a page where i would want to open a new window when i press an icon next to the song title and have a MediaPlayback Flash component to play that song.  
A standalone MP3 is not OK…has to be either incorporated (only playing part) into the choosing page or the way im trying to do.  
Something with the overall design… 🙂  
So…is there a way to feed the component contentPath to the song when i click on the icon? Maybe via PHP and loadVars? Ive tried something like this already but didnt work. Although in worst case scenario ill just create a swf file for each MP3 🙂

This is what i tried though:  
the code i put on mediaPlayback

```auto

on(load){
    var dataIn = new LoadVars();
    
    dataIn.onLoad = function(){
     var conPath = this.komad;
     player.contentPath = conPath; //player is an instance name of MediaPlayback component on Stage
    }
    
    dataIn.load("peeppop.php");
}

```

in php

```auto

<a href="#" onclick="
<?php
echo '&komad = music/01.mp3&';
?>
"><img src="images/zvocnik.gif" /></a>

```
