How do I best insert Variables in the below code?
I need to call the filenames of the flash videoa and the related jpg files of the starting frame form a database using asp vpscript.
I understand the difference between server side asp and client side java ...
This ist the code I want to use
<script type='text/javascript' src='/embed/swfobject.js'></script>
<div id='mediaspace'>This div will be replaced</div>
<script type='text/javascript'>
var s1 = new SWFObject('/jw/embed/player.swf','ply','470','320','9','#ffffff');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('wmode','opaque');
s1.addParam('flashvars','file=http://content.longtailvideo.com/videos/flvplayer.flv');
s1.write('mediaspace');
</script>
In place of <b>'file=http://content.longtailvideo.com/videos/flvplayer.flv'<b>
I want to use a variable definded in asp.
How can I do this?
Thanks for helping out

Inline:
<script type='text/javascript'>var s1 = new SWFObject('/jw/embed/player.swf','ply','470','320','9','#ffffff');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('wmode','opaque');
s1.addParam('flashvars','file=<%=variablename%>&autostart=true');
s1.write('mediaspace');
</script>
Using a JavaScript variable:
<script type='text/javascript'>var file = '<%=variablename%>';
var s1 = new SWFObject('/jw/embed/player.swf','ply','470','320','9','#ffffff');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('wmode','opaque');
s1.addParam('flashvars','file=' + file + '&autostart=true');
s1.write('mediaspace');
</script>