1
8
9
12 class com.sekati.external.JsBase {
13
14
17 public static function resizeWindow(w:Number, h:Number):Void {
18 getURL( "javascript:top.resizeTo(" + w + "," + h + ")" );
19 }
20
21
24 public static function shakeWindow(amount:Number):Void {
25 getURL( "javascript:function shakewin(n){if(parent.moveBy){for(i = 10;i > 0;i--){for(j = n;j > 0;j--){parent.moveBy(0,i);parent.moveBy(i,0);parent.moveBy(0,-i);parent.moveBy(-i,0);}}}};shakewin(" + amount + ");void(0)" );
26 }
27
28
31 public static function status(msg:String):Void {
32 getURL( "javascript:if(typeof(this.href) != 'undefined') window.status = '" + msg + "' + ' URL: ' + this.href;else return false;void(0)" );
33 }
34
35
38 public static function centerPop(wURL:String, wName:String, w:Number, h:Number, scr:Boolean):Void {
39 var cx:Number = Math.round( (System.capabilities.screenResolutionX / 2) - (w / 2) );
40 var cy:Number = Math.round( (System.capabilities.screenResolutionY / 2) - (h / 2) );
41 getURL( "javascript:NewWindow=window.open('" + wURL + "','" + wName + "','width=" + w + ",height=" + h + ",left=" + cx + ",top=" + cy + ",screenX=" + cx + ",screenY=" + cy + ",toolbar=no,location=no,scrolling=" + scr + ",directories=no,scrollbars=" + scr + ",status=no,statusbar=no,resizable=no,fullscreen=no'); NewWindow.focus(); void(0);" );
42 }
43
44 private function JsBase() {
45 }
46 }