Strange HTML block

Permalink 1 user found helpful
Hello, I'm making my website concretely ;)with this great cms...

I'm in trouble when I use the html block. I'd like to insert the longtail jw videoplayer... I insert the html code in edit mode in the block:

<div align="center">

<script type='text/javascript' src='mediaplayer/swfobject.js'></script>

<div id='mediaspace'>This text will be replaced</div>

<script type='text/javascript'>
var so = new SWFObject('mediaplayer/player.swf','ply','470','470','9','#');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','/mediaplayer/videos/showreel/showreel.xml');
so.addVariable('backcolor','A8BCD5');
so.addVariable('frontcolor','54555E');
so.addVariable('skin','mediaplayer/modieus.swf');
so.addVariable('playlist','bottom');

so.write('mediaspace');
</script>
</div>

And when I update the block in edit mode the player appears and works... When I save the page it doesn't... It shows me "this text will be replaced"...

Very strange... Do you have suggestions for me please?

 
jereme replied on at Permalink Reply
jereme
I get the feeling you're using SWFObject 1.5 syntax.

Hard to reference how it should be as those docs aren't up anymore.

Are you getting any erros in your javascript console?
jereme replied on at Permalink Reply
jereme
Just try using their embed code. It's not the best, but it will work easier.

<embed
  src='player.swf'
  width='470'
  height='320'
  bgcolor='#ffffff'
  allowscriptaccess='always'
  allowfullscreen='true'
  flashvars='file=http://content.longtailvideo.com/videos/flvplayer.flv'
/>
jereme replied on at Permalink Reply
jereme
For those wondering how I arrived at this, I was able to ask peter some questions in IRC that helped me figure out what was going on.

<div align="center">
<script type='text/javascript' src='/mediaplayer/swfobject.js'></script>
<div id='mediaspace'>This text will be replaced</div>
<script type='text/javascript'>
var so = new SWFObject('/mediaplayer/player.swf','ply','470','470','9','#');
so.addParam('allowfullscreen','true');
so.addParam('allowscriptaccess','always');
so.addParam('wmode','opaque');
so.addVariable('file','/mediaplayer/videos/showreel/showreel.xml');
so.addVariable('backcolor','A8BCD5');
so.addVariable('frontcolor','54555E');
so.addVariable('skin','/mediaplayer/modieus.swf');
so.addVariable('playlist','bottom');
so.write('mediaspace');
</script>