http://www.estudiobaires.com/examples/popup2.swfTo pop-up a new window with a username, write this to your button:
getURL("javascript: newWindow('username'");
In the HTML page this JavaScript function
function newWindow(username){
var url ="message.html?username="+username;
window.open(url, username, 'toolbar=no, location=no, status=no, menubar=no, scrollbars=no, resizable=no, width=100, height=120, left=100, top=100');
}
This is the source of the pop-up HTML. It writes dinamically all the Flash OBJECT end EMBED tag. It appends also the variable to the movie, that becomes avaible as any other variable in root ion the message.swf movie
<HTML><HEAD><TITLE>message</TITLE></HEAD><BODY>
<script language="JavaScript" type="text/JavaScript">
<!--
var ref=location.search;
ref=ref.split("=");
var user=ref[1];
var c=">"; // I will use the closing tag more than once
var oC="<OBJECT classid=\'clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\' ";
var cB=" codebase=\'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\' ";
var w=" WIDTH=100 ";
var h=" HEIGHT=100 ";
var pN=" <PARAM NAME=movie VALUE="
var pQ=" <PARAM NAME=quality VALUE=best> ";
var pW=" <PARAM NAME=wmode VALUE=transparent> ";
var pB=" <PARAM NAME=bgcolor VALUE=#FFFFFF";
var bG="#FFFFFF";
var eS=" <EMBED src=";
var eQ=" quality=best ";
var eW=" wmode=transparent ";
var eB=" bgcolor=";
var eT=" TYPE=\'application/x-shockwave-flash\' ";
var eP= "PLUGINSPAGE=\'http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\'> ";
var eO=" </EMBED> </OBJECT> ";
// the last step
var line01=oC+cB+w+h+c+pN;
var line02=c+pQ+pB+bG+c+eS;
var line03=eQ+eB+bG+w+h+eT+eP+eO;
// here is our most crucial variable- pay attention to the "?" at the end of the movie name
// we append the cookie query string at the end of the movie name
var movieName ="message.swf?user="+user;
// write the OBJECT/EMBED tags
document.write(line01+movieName+line02+movieName+line03);
// ...done
//-->
</SCRIPT>
</BODY></HTML>
Jorge