Hi,
I need to open a pop up window from a SWF using actionscript 3.0 and Java.. I found some code to open the the window (it works great in all browsers), but I'm not sure how to control the size dimensions of the pop window. I'm not that familiar with Java. Any ideas.. Here's my code:
public class TestPopup extends Sprite {
private var boarder:mcBoarder;
private var _test:int;
private var _origXScale:Number;
private var _origYScale:Number;
public function TestPopup() {
boarder = new mcBoarder();
addChild(boarder);
boarder.addEventListener(MouseEvent.CLICK, _testClick);
boarder.buttonMode = true;
boarder.useHandCursor = true;
addChild(boarder);
boarder.x = 200;
boarder.y = 200;
}
private function _testClick(e:MouseEvent):void {
ChangePage("http://www.Webpage.com", "_blank");
}
public static function ChangePage(url:*, window:String = "_self"):void {
var req:URLRequest = url is String ? new URLRequest(url) : url;
if (!ExternalInterface.available) {
navigateToURL(req, window);
} else {
var strUserAgent:String = String(ExternalInterface.call("function() {return
navigator.userAgent;}")).toLowerCase();
if (strUserAgent.indexOf("firefox") != -1 || (strUserAgent.indexOf("msie") != -1 && uint(strUserAgent.substr(strUserAgent.indexOf("msie") + 5, 3)) >= 7)) {
ExternalInterface.call("window.open", req.url, window);
} else {
navigateToURL(req, window);
}
}
}
}
}