Hi all,
Is it possible to let the link-flashvar behave like window.open, so I can open a resized window (without controlbars and all that)?
Any help would be appeciated!
Hans
Hi all,
Is it possible to let the link-flashvar behave like window.open, so I can open a resized window (without controlbars and all that)?
Any help would be appeciated!
Hans
Found it myself.
An example is:
<html>
<head>
<title>JW API Example 7-4-1-0 - JW FLV Media Player</title>
<style type="text/css">
#wrapper { position:absolute; left:50px; top:75px; width:300; height:196; }
</style>
<script type="text/javascript" src="swfobject.js"></script>
<script type="text/javascript">
function myFunction() {
alert('You clicked !\n\nExecute your function here...');
}
function createPlayer(theFile) {
var flashvars = {
file:theFile,
autostart:"true",
link:"javascript:myFunction();",
linktarget:"_self",
displayclick:"link"
}
var params = {
allowfullscreen:"true",
allowscriptaccess:"always"
}
var attributes = {
id:"player1",
name:"player1"
}
swfobject.embedSWF("player.swf", "placeholder1", "300", "196", "9.0.115", false, flashvars, params, attributes);
}
</script>
<head>
<body onload="createPlayer('http://content.bitsontherun.com/videos/3ta6fhJQ.flv')" bgcolor="#CCCCCC">
<a href="http://www.jeroenwijering.com/?item=JW_FLV_Media_Player">JW FLV Media Player</a><br>
Execute JavaScript from the flashvar link.<br>
<br>
<div id="wrapper">
<div id="placeholder1"></div>
</div>
</body>
</html>
<!-- end of page - delete this and next lines --><!-- Nedenstående indsat af TDC for at måle trafikken samtidig med at brugeren er 100% anonym. Koden må ikke sættes ud af funktion, kopieres, eller ændres. --> <img src="http://statistik-gallup.net/V11***tdckoncern_dk/dk/ISO-8859-1//">