bravo14 Posted December 20, 2008 Share Posted December 20, 2008 Hello guys I have put together a music player in flash that reads a XML file, but what I want to do is allow the user to upload their own tracks and the Music player picks up the details. Does anybody have any ideas? Kind regards Mark Quote Link to comment Share on other sites More sharing options...
jonsjava Posted December 20, 2008 Share Posted December 20, 2008 I'd recommend you create a table on a database, with the fields (just winging it here) id, owner, title, link. Then you just have them upload files to your server, and have it save the relative link for that file in the database. Next, for each user, you just have it build the XML file on the fly from the database. If you can come up with some code, I'll be glad to review and improve it for you. Quote Link to comment Share on other sites More sharing options...
redarrow Posted December 20, 2008 Share Posted December 20, 2008 take a look at this. http://simpleforum.ath.cx/pop.php you can convert this to play youtube tunes. get the user to post the right link to the database save you time and bandwidth. just an i dear for you. pop.php <script language="javascript" type="text/javascript"> <!-- function popitup(url) { newwindow=window.open(url,'name','height=344,width=425'); if (window.focus) {newwindow.focus()} return false; } // --> </script> <?php $a=array( "michel jackson 1"=>"http://www.youtube.com/v/vd15YVb2M6M&hl=en&fs=1", "michel jackson 2"=>"http://www.youtube.com/v/0w0mAcwJ3NE&hl=en&fs=1", "pink 1"=>"http://www.youtube.com/v/X-tbJOFcQw8&hl=en&fs=1", "pink 2"=>"http://www.youtube.com/v/L7JCcHOnMyw&hl=en&fs=1" ); foreach($a as $key=>$val){ ?> <a href="pop2.php?mov=<?php echo $val;?>" onclick="return popitup('pop2.php?mov=<?php echo $val; ?>')"><?php echo $key; ?></a> <br><br> <?php }?> <?php session_start();?> <object width="425" height="344"><param name="movie" value="<?php echo $_GET['mov']; ?>"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="<?php echo $_GET['mov']; ?>" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.