Dieses Script zeigt wie man mit
JS Variablen an eine SWF übergeben kann.
In diesem Bsp wird dei Bildschirmauflösung übermittelt:
PHP-Code:
<html>
<head>
<title>Aufloesung</title>
<script language="JavaScript"><!--
// Film (pfad und name)
var film = "test.swf";
// Film_WIDTH (fla - Einstellungen oder Prozentwerte)
var Movie_WIDTH = "100%";
// Film_HEIGHT (fla - Einstellungen oder Prozentwerte)
var Movie_HEIGHT = "100%";
var url_ges = "'"+film+"?weite="+screen.width+"&hoehe="+screen.height;
document.open("text/htm")
document.writeln("<html><head><title>Aufloesung</title>")
document.writeln("</HEAD>")
document.writeln("<BODY bgcolor='#FFFFFF'>")
document.writeln("<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' WIDTH="+Movie_WIDTH+" HEIGHT="+Movie_HEIGHT+" >")
document.writeln("<PARAM NAME= movie VALUE="+url_ges+"'>")
document.writeln("<PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=exactfit><PARAM NAME=bgcolor VALUE=#FFFFFF>")
document.writeln("<EMBED src="+url_ges+"' quality=high name=datum scale=exactfit bgcolor=#FFFFFF WIDTH="+Movie_WIDTH+" HEIGHT="+Movie_HEIGHT+" TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'></EMBED>")
document.writeln("</OBJECT>")
document.close()
// -->
</script>
</head>
<body>
</body>
</html>
Anbei auch das gesamt BSP.
Viel Spaß beim probieren...
SABAN