Music Player Embed

Topics: Customizing Orchard, General
May 26, 2011 at 9:26 PM

Hello,

I am attempting to embed the following music player:

http://www.premiumbeat.com/flash_player_customization_tool/#player=originalThin&source=OriginalThinMusicPlayer.swf&width=220&height=21&firstColor=c73737&secondColor=cccccc&backColor=000000&strokeColor=c73737&mediaPath=/music/hurst_instrumental.mp3&autoPlay=true&autoLoad=true

It is not showing up for some reason, any ideas?

Regards,

TJ Havens

May 26, 2011 at 9:51 PM

How are you trying to embed it?

May 27, 2011 at 1:13 AM

I have tried both the object and javascript method...

May 27, 2011 at 1:16 AM

Perhaps you could paste the code you're trying to use ... ?

May 27, 2011 at 7:31 PM

<object type="application/x-shockwave-flash"  allowscriptaccess="always" allowfullscreen="true" data="OriginalThinMusicPlayer.swf" width="220" height="21"><param name="movie" value="OriginalThinMusicPlayer.swf" /><param name="FlashVars" value="firstColor=c73737&secondColor=cccccc&backColor=000000&strokeColor=c73737&mediaPath=/music/hurst_instrumental.mp3&autoPlay=true&autoLoad=true" /></object>

May 27, 2011 at 8:04 PM

You need to specify a full absolute path to the swf file.

Jun 3, 2011 at 9:00 PM
Edited Jun 3, 2011 at 9:11 PM

Ok, check out my code here, not sure what I am doing wrong?

 

<div id="hursthomepagemusic">
<object type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" data="http://www.hurstindustriez.com/LWMusicPlayer.swf" width="220" height="21">
<param name="movie" value="http://www.hurstindustriez.com/LWMusicPlayer.swf" />
<param name="FlashVars" value="firstColor=c73737&amp;secondColor=cccccc&amp;backColor=000000&amp;strokeColor=c73737&amp;mediaPath=/music/hurst_instrumental.mp3&amp;autoPlay=true&amp;autoLoad=true" />
</object>
</div>


Jun 4, 2011 at 3:58 AM

Copy the address into your browser: http://www.hurstindustriez.com/LWMusicPlayer.swf

You'll see a "resource cannot be found" error.

If the swf isn't at the path you've specified, it can't load.

Jun 5, 2011 at 4:35 PM

If the resource is there, what would cause this error to appear? I have double checked and the .swf file is there and named correctly...

Jun 5, 2011 at 6:47 PM

The problem will be that Orchard's Web.config doesn't permit static files to be served from the root directory. You should move the swf into the Content folder of your module or theme - that's the usual place to store static files - and make sure it has the same Web.config as the Styles folder. It's not a good idea to modify the contents of any folders outside of your own themes and modules.

Jun 9, 2011 at 8:37 PM

Ok, thanks, that worked...