2 * Copyright (C) 2007-2008 Benjamin Otte <otte@gnome.org>
3 * 2007 Pekka Lampila <pekka.lampila@iki.fi>
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301 USA
23 ASSetPropFlags
= ASnative
(1, 0);
24 ASSetNative
= ASnative
(4, 0);
25 ASSetNativeAccessor
= ASnative
(4, 1);
30 /* Only Flash extensions here, rest to swfdec_as_initialize.as */
32 Object.registerClass
= ASnative
(101, 8);
33 ASSetPropFlags
(Object, null, 7);
35 // so we can use it in this script
36 ASSetPropFlags
(Object, "addProperty", 0, 128);
40 function Error (msg
) {
41 if (typeof (msg
) != "undefined")
44 Error.prototype
.name
= Error.prototype
.message
= "Error";
45 Error.prototype
.toString
= function () {
49 /*** ASBROADCASTER ***/
51 function AsBroadcaster
() { };
53 AsBroadcaster
.broadcastMessage
= ASnative
(101, 12);
55 AsBroadcaster
.addListener
= function (x
) {
56 this.removeListener
(x
);
57 this._listeners
.push
(x
);
61 AsBroadcaster
.removeListener
= function (x
) {
62 var l
= this._listeners
;
65 for (var i
= 0; i
< l
.length
; i
++) {
74 AsBroadcaster
.initialize
= function (o
) {
75 o
.broadcastMessage
= ASnative
(101, 12);
76 o
.addListener
= AsBroadcaster
.addListener
;
77 o
.removeListener
= AsBroadcaster
.removeListener
;
79 ASSetPropFlags
(o
, "broadcastMessage,addListener,removeListener,_listeners", 131);
82 Key
= { ALT
: 18, BACKSPACE
: 8, CAPSLOCK
: 20, CONTROL
: 17, DELETEKEY
: 46,
83 DOWN
: 40, END
: 35, ENTER
: 13, ESCAPE
: 27, HOME
: 36, INSERT
: 45, LEFT
: 37,
84 PGDN
: 34, PGUP
: 33, RIGHT
: 39, SHIFT
: 16, SPACE
: 32, TAB
: 9, UP
: 38 };
85 ASSetNative
(Key
, 800, "getAscii,getCode,isDown,isToggled,isAccessible");
86 AsBroadcaster
.initialize
(Key
);
87 ASSetPropFlags
(Key
, null, 7);
92 Mouse.show
= ASnative
(5, 0);
93 Mouse.hide
= ASnative
(5, 1);
94 AsBroadcaster
.initialize
(Mouse);
95 ASSetPropFlags
(Mouse, null, 7);
100 AsBroadcaster
.initialize
(Stage);
101 ASSetNativeAccessor
(Stage, 666, "scaleMode,align,width,height,showMenu,displayState", 1);
102 ASSetNativeAccessor
(Stage, 666, "9fullScreenSourceRect,9fullScreenHeight,9fullScreenWidth", 100);
104 /*** NetConnection ***/
106 // FIXME: this should actually be a non-native function that calls the ASnative
108 NetConnection = ASconstructor
(2100, 200);
110 ASSetNative
(NetConnection.prototype
, 2100, "6connect,6close,6call,6addHeader");
111 NetConnection.prototype
.addProperty
("connectedProxyType", ASnative
(2100, 4), null);
112 NetConnection.prototype
.proxyType
= "none";
113 NetConnection.prototype
.addProperty
("usingTLS", ASnative
(2100, 5), null);
114 ASSetPropFlags
(NetConnection.prototype
, null, 3);
118 NetStream.prototype
.publish
= function () {
119 var o
= {}; o
["Implement NetStream.publish"] ();
122 NetStream.prototype
.receiveAudio
= function (flag
) {
123 var o
= {}; o
["Implement NetStream.receiveAudio"] ();
126 NetStream.prototype
.receiveVideo
= function (flag
) {
127 var o
= {}; o
["Implement NetStream.receiveVideo"] ();
130 ASSetNative
(NetStream.prototype
, 2101, "6close,6attachAudio,6attachVideo,6send,6setBufferTime");
131 ASSetNativeAccessor
(NetStream.prototype
, 2101, "checkPolicyFile", 5);
132 ASSetPropFlags
(NetStream.prototype
, null, 3);
136 XMLNode = ASconstructor
(253, 0);
138 XMLNode.prototype
.cloneNode
= ASnative
(253, 1);
139 XMLNode.prototype
.removeNode
= ASnative
(253, 2);
140 XMLNode.prototype
.insertBefore
= ASnative
(253, 3);
141 XMLNode.prototype
.appendChild
= ASnative
(253, 4);
142 XMLNode.prototype
.hasChildNodes
= ASnative
(253, 5);
143 XMLNode.prototype
.toString
= ASnative
(253, 6);
144 XMLNode.prototype
.getNamespaceForPrefix
= ASnative
(253, 7);
145 XMLNode.prototype
.getPrefixForNamespace
= ASnative
(253, 8);
149 XML = ASconstructor
(253, 9);
151 XML.prototype
= new XMLNode (1, "");
152 delete XML.prototype
.constructor
;
153 ASSetPropFlags
(XML, "prototype", 3);
155 XML.prototype
.load
= ASnative
(301, 0);
156 XML.prototype
.send
= ASnative
(301, 1);
157 XML.prototype
.sendAndLoad
= ASnative
(301, 2);
158 XML.prototype
.createElement
= ASnative
(253, 10);
159 XML.prototype
.createTextNode
= ASnative
(253, 11);
160 XML.prototype
.parseXML
= ASnative
(253, 12);
162 XML.prototype
.onLoad
= function () {
165 // Note: handling of loaded is different here than in LoadVars
166 XML.prototype
.onData
= function (src
) {
177 XML.prototype
.getBytesLoaded
= function () {
178 return this._bytesLoaded
;
181 XML.prototype
.getBytesTotal
= function () {
182 return this._bytesTotal
;
185 XML.prototype
.addRequestHeader
= function (key
, value
) {
186 if (typeof (this._customHeaders
) == "undefined") {
187 this._customHeaders
= new Array ();
188 ASSetPropFlags
(this, "_customHeaders", 131);
190 if (typeof (key
) == "string" && typeof (value
) == "string") {
191 this._customHeaders
.push
(key
, value
);
192 } else if (key
instanceof Array) {
193 for (var i
= 0; i
+ 1 < key
.length
; i
+= 2) {
194 this.addRequestHeader
(key
[i
], key
[i
+ 1]);
201 function LoadVars
() { };
203 LoadVars
.prototype
.contentType
= "application/x-www-form-urlencoded";
205 LoadVars
.prototype
.load
= ASnative
(301, 0);
206 LoadVars
.prototype
.send
= ASnative
(301, 1);
207 LoadVars
.prototype
.sendAndLoad
= ASnative
(301, 2);
208 LoadVars
.prototype
.decode
= ASnative
(301, 3);
210 LoadVars
.prototype
.onLoad
= function () {
213 LoadVars
.prototype
.onData
= function (src
) {
223 LoadVars
.prototype
.toString
= function () {
225 for (var x
in this) {
226 a
.push
(escape
(x
) + "=" + escape
(this[x
]));
231 LoadVars
.prototype
.getBytesLoaded
= function () {
232 return this._bytesLoaded
;
235 LoadVars
.prototype
.getBytesTotal
= function () {
236 return this._bytesTotal
;
239 // Duplicated from XML
240 // Just using the same function here fails loadvars-properties test
241 LoadVars
.prototype
.addRequestHeader
= function (key
, value
) {
242 if (typeof (this._customHeaders
) == "undefined") {
243 this._customHeaders
= new Array ();
244 ASSetPropFlags
(this, "_customHeaders", 131);
246 if (typeof (key
) == "string" && typeof (value
) == "string") {
247 this._customHeaders
.push
(key
, value
);
248 } else if (key
instanceof Array) {
249 for (var i
= 0; i
+ 1 < key
.length
; i
+= 2) {
250 this.addRequestHeader
(key
[i
], key
[i
+ 1]);
255 ASSetPropFlags
(LoadVars
.prototype
, null, 131);
259 Sound = ASconstructor
(500, 16);
260 ASSetNative
(Sound.prototype
, 500, "getPan,getTransform,getVolume,setPan,setTransform,setVolume,stop,attachSound,start,6getDuration,6setDuration,6getPosition,6setPosition,6loadSound,6getBytesLoaded,6getBytesTotal,9areSoundsInaccessible");
261 ASSetNativeAccessor
(Sound.prototype
, 500, "checkPolicyFile", 18);
262 ASSetPropFlags
(Sound.prototype
, null, 7);
268 System.capabilities
= {};
269 System.capabilities
.Query
= ASnative
(11, 0);
270 System.capabilities
.Query
();
271 delete System.capabilities
.Query
;
273 System.setClipboard
= ASnative
(1066, 0);
274 System.showSettings
= ASnative
(2107, 0);
275 ASSetNativeAccessor
(System, 2107, "exactSettings,useCodepage", 1);
276 ASSetPropFlags
(System, "exactSettings,useCodePage", 128);
278 /*** System.security */
280 System.security
= new Object();
281 delete System.security
.constructor
;
282 ASSetNative
(System.security
, 12, "allowDomain,7allowInsecureDomain,loadPolicyFile,chooseLocalSwfPath,escapeDomain");
283 ASSetNativeAccessor
(System.security
, 12, "sandboxType", 5);
285 /*** System.security.PolicyFileResolver */
287 System.security
.PolicyFileResolver
= function () {
288 var o
= {}; o
["Implement System.security.PolicyFileResolver"] ();
290 System.security
.PolicyFileResolver
.prototype
.resolve
= ASnative
(15, 0);
291 AsBroadcaster
.initialize
(System.security
.PolicyFileResolver
.prototype
);
293 /*** System.Product ***/
295 System.Product
= function () {
296 var o
= {}; o
["Implement System.Product"] ();
299 System.Product
.prototype
.isRunning
= function () {
300 var o
= {}; o
["Implement System.Product.isRunning"] ();
303 System.Product
.prototype
.isInstalled
= function () {
304 var o
= {}; o
["Implement System.Product.isInstalled"] ();
307 System.Product
.prototype
.launch
= function () {
308 var o
= {}; o
["Implement System.Product.launch"] ();
311 System.Product
.prototype
.download
= function () {
312 var o
= {}; o
["Implement System.Product.download"] ();
315 System.Product
.prototype
.installedVersion
= function () {
316 var o
= {}; o
["Implement System.Product.installedVersion"] ();
319 System.Product
.prototype
.validate
= function () {
320 var o
= {}; o
["Implement System.Product.validate"] ();
323 ASSetPropFlags
(System.Product
.prototype
, null, 3);
328 ALPHANUMERIC_FULL
: "ALPHANUMERIC_FULL",
329 ALPHANUMERIC_HALF
: "ALPHANUMERIC_HALF",
331 JAPANESE_HIRAGANA
: "JAPANESE_HIRAGANA",
332 JAPANESE_KATAKANA_FULL
: "JAPANESE_KATAKANA_FULL",
333 JAPANESE_KATAKANA_HALF
: "JAPANESE_KATAKANA_HALF",
338 AsBroadcaster
.initialize
(System.IME);
340 ASSetNative
(System.IME, 13, "8getEnabled,8setEnabled,8getConversionMode,8setConversionMode,8setCompositionString,8doConversion");
341 ASSetPropFlags
(System.IME, null, 7);
345 Color = function (target
) {
346 this.target
= target
;
347 ASSetPropFlags
(this, null, 7);
349 ASSetNative
(Color.prototype
, 700, "setRGB,setTransform,getRGB,getTransform");
350 ASSetPropFlags
(Color.prototype
, null, 7);
354 TextSnapshot = ASconstructor
(1067, 0);
355 ASSetNative
(TextSnapshot.prototype
, 1067, "6getCount,6setSelected,6getSelected,6getText,6getSelectedText,6hitTestTextNearPos,6findText,6setSelectColor,6getTextRunInfo", 1);
359 MovieClip.prototype
.useHandCursor
= true;
360 MovieClip.prototype
.enabled
= true;
362 MovieClip.prototype
.meth
= function (method
) {
363 var lower
= method
.toLowerCase
();
364 if (lower
== "post") {
366 } else if (lower
== "get") {
373 MovieClip.prototype
.getURL
= function (url
, target
, method
) {
374 if (typeof (target
) == "undefined")
375 target
= ""; // undefined to empty string, even in version >= 7
377 var type
= this.meth
(method
);
379 getURL
(url
, target
);
380 } else if (type
== 1) {
381 getURL
(url
, target
, "GET");
383 getURL
(url
, target
, "POST");
387 // work around ming bug, causing loadVariables to be lower cased
388 MovieClip.prototype
["loadVariables"] = function (url
, method
) {
389 var type
= this.meth
(method
);
392 loadVariables
(url
, this._target
);
393 } else if (type
== 1) {
394 loadVariables
(url
, this._target
, "GET");
396 loadVariables
(url
, this._target
, "POST");
401 // work around ming bug, causing loadMovie to be lower cased
402 MovieClip.prototype
["loadMovie"] = function (url
, method
) {
403 var type
= this.meth
(method
);
406 loadMovie
(url
, this._target
);
407 } else if (type
== 1) {
408 loadMovie
(url
, this._target
, "GET");
410 loadMovie
(url
, this._target
, "POST");
415 MovieClip.prototype
.unloadMovie
= function () {
417 loadMovie
("", this._target
);
421 MovieClip.prototype
.getTextSnapshot
= function () {
422 return new TextSnapshot(this);
424 ASSetPropFlags
(MovieClip.prototype
, "getTextSnapshot", 128);
427 ASSetNative
(MovieClip.prototype
, 900, "attachMovie,swapDepths,localToGlobal,globalToLocal,hitTest,getBounds,getBytesTotal,getBytesLoaded,6attachAudio,6attachVideo,6getDepth,6setMask,play,stop,nextFrame,prevFrame,gotoAndPlay,gotoAndStop,duplicateMovieClip,removeMovieClip,startDrag,stopDrag,7getNextHighestDepth,7getInstanceAtDepth,getSWFVersion,8attachBitmap,8getRect");
428 ASSetNativeAccessor
(MovieClip.prototype
, 900, "tabIndex", 200);
429 ASSetNativeAccessor
(MovieClip.prototype
, 900, "_lockroot", 300);
430 ASSetNativeAccessor
(MovieClip.prototype
, 900, "8cacheAsBitmap,8opaqueBackground,8scrollRect", 401);
431 ASSetNativeAccessor
(MovieClip.prototype
, 900, "8filters,8transform", 417);
432 ASSetNativeAccessor
(MovieClip.prototype
, 900, "8blendMode", 500);
434 ASSetNative
(MovieClip.prototype
, 901, "6createEmptyMovieClip,6beginFill,6beginGradientFill,6moveTo,6lineTo,6curveTo,6lineStyle,6endFill,6clear,8lineGradientStyle,8beginMeshFill,8beginBitmapFill");
435 ASSetNativeAccessor
(MovieClip.prototype
, 901, "8scale9Grid", 12);
437 MovieClip.prototype
.createTextField
= ASnative
(104, 200);
439 ASSetPropFlags
(MovieClip.prototype
, null, 3);
441 /* MovieClipLoader */
443 MovieClipLoader
= ASconstructor
(112, 0);
444 ASSetNative
(MovieClipLoader
.prototype
, 112, "7loadClip,7getProgress,7unloadClip", 100);
445 AsBroadcaster
.initialize
(MovieClipLoader
.prototype
);
446 ASSetPropFlags
(MovieClipLoader
.prototype
, null, 1027);
450 TextField = ASconstructor
(104, 0);
451 TextField.getFontList
= ASnative
(104, 201);
453 ASSetNative
(TextField.prototype
, 104, "6replaceSel,6getTextFormat,6setTextFormat,6removeTextField,6getNewTextFormat,6setNewTextFormat,6getDepth,7replaceText", 100);
454 AsBroadcaster
.initialize
(TextField.prototype
);
456 ASSetPropFlags
(TextField.prototype
, null, 131);
458 ASSetNativeAccessor
(TextField.prototype
, 104, "8gridFitType,8antiAliasType,8thickness,8sharpness,8filters", 300);
459 // FIXME: this should be done inside the TextField constructor
460 ASSetNativeAccessor
(TextField.prototype
, 900, "8tabIndex", 200);
462 ASSetPropFlags
(TextField, null, 131);
466 TextFormat = ASconstructor
(110, 0);
468 /* TextField.Stylesheet */
470 TextField.StyleSheet = ASconstructor
(113, 0);
472 TextField.StyleSheet.prototype
._copy
= function (o
) {
473 if (typeof (o
) != "object")
477 for (var prop
in o
) {
478 o_new
[prop
] = o
[prop
];
483 TextField.StyleSheet.prototype
.clear
= function () {
489 TextField.StyleSheet.prototype
.getStyle
= function (name
) {
490 return (this._copy
(this._css
[name
]));
493 TextField.StyleSheet.prototype
.setStyle
= function (name
, style
) {
497 this._css
[name
] = this._copy
(style
);
498 this.doTransform
(name
);
502 TextField.StyleSheet.prototype
.getStyleNames
= function () {
503 var tmp
= this._css
; /* ming bug? */
505 for (var prop
in tmp
) {
511 TextField.StyleSheet.prototype
.doTransform
= function (name
) {
515 this._styles
[name
] = this.transform
(this._css
[name
]);
518 TextField.StyleSheet.prototype
.transform
= function (style
) {
522 var format
= new TextFormat ();
525 format
.align
= style
.textAlign
;
527 if (style
.fontWeight
== "bold") {
529 } else if (style
.fontWeight
== "normal") {
534 var tmp
= this.parseColor
(style
.color
);
539 format
.display
= style
.display
;
541 if (style
.fontFamily
)
542 format
.font
= this.parseCSSFontFamily
(style
.fontFamily
);
544 if (style
.textIndent
)
545 format
.indent
= parseInt
(style
.textIndent
);
547 if (style
.fontStyle
== "italic") {
548 format
.italic
= true;
549 } else if (style
.fontStyle
== "normal") {
550 format
.italic
= false;
553 if (style
.kerning
== "true") {
554 format
.kerning
= true;
555 } else if (style
.kerning
== "false") {
556 format
.kerning
= false;
558 format
.kerning
= parseInt
(style
.kerning
);
562 format
.leading
= parseInt
(style
.leading
);
564 if (style
.marginLeft
)
565 format
.leftMargin
= parseInt
(style
.marginLeft
);
567 if (style
.letterSpacing
)
568 format
.letterSpacing
= parseInt
(style
.letterSpacing
);
570 if (style
.marginRight
)
571 format
.rightMargin
= parseInt
(style
.marginRight
);
573 if (style
.fontSize
) {
574 var tmp
= parseInt
(style
.fontSize
);
579 if (style
.textDecoration
== "underline") {
580 format
.underline
= true;
581 } else if (style
.textDecoration
== "none") {
582 format
.underline
= false;
588 TextField.StyleSheet.prototype
.parseCSS
= function (css
) {
589 var result
= this.parseCSSInternal
(css
);
590 if (typeof (result
) == "null")
596 for (var prop
in result
) {
597 this._css
[prop
] = this._copy
(result
[prop
]);
598 this.doTransform
(prop
);
605 TextField.StyleSheet.prototype
.parse
= TextField.StyleSheet.prototype
.parseCSS
;
607 TextField.StyleSheet.prototype
.load
= ASnative
(301, 0);
609 TextField.StyleSheet.prototype
.onLoad
= function () {
612 TextField.StyleSheet.prototype
.onData
= function (src
) {
614 var result
= this.parse
(src
);
615 this.loaded
= result
;
616 this.onLoad
(result
);
622 ASSetNative
(TextField.StyleSheet.prototype
, 113, "7update,7parseCSSInternal,7parseCSSFontFamily,7parseColor", 100);
623 ASSetPropFlags
(TextField.StyleSheet.prototype
, null, 1027);
624 ASSetPropFlags
(TextField, "StyleSheet", 1027);
628 ASSetNative
(Video.prototype
, 667, "6attachVideo,6clear", 1);
629 ASSetPropFlags
(Video.prototype
, null, 3);
634 ASSetNative
(Accessibility, 1999, "6isActive,6sendEvent,6updateProperties");
635 ASSetPropFlags
(Accessibility, null, 6);
642 Camera.get = function (index
) {
643 var get_func
= ASnative
(2102, 200);
644 return get_func
(index
);
646 Camera.addProperty
("names", ASnative
(2102, 201), null);
647 ASSetNative
(Camera.prototype
, 2102, "6setMode,6setQuality,6setKeyFrameInterval,6setMotionLevel,6setLoopback,6setCursor");
648 ASSetPropFlags
(Camera.prototype
, null, 3);
652 function ContextMenu (callback
) {
653 this.onSelect
= callback
;
654 this.customItems
= new Array ();
655 this.builtInItems
= {
667 ContextMenu.prototype
.copy
= function () {
668 var o
= new ContextMenu ();
670 o
.onSelect
= this.onSelect
;
672 o
.customItems
= new Array ();
673 for (var i
= 0; i
< this.customItems
.length
; i
++) {
674 o
.customItems
.push
(this.customItems
[i
].copy
());
677 o
.builtInItems
= this.builtInItems
;
682 ContextMenu.prototype
.hideBuiltInItems
= function () {
683 this.builtInItems
= {
695 ASSetPropFlags
(ContextMenu.prototype
, null, 1027);
697 /* ContextMenuItem */
699 function ContextMenuItem (caption
, callback
, separatorBefore
, enabled
, visible
)
701 this.caption
= caption
;
702 this.onSelect
= callback
;
703 if (separatorBefore
== undefined) {
704 this.separatorBefore
= false;
706 this.separatorBefore
= separatorBefore
;
708 if (enabled
== undefined) {
711 this.enabled
= enabled
;
713 if (visible
== undefined) {
716 this.visible
= visible
;
720 ContextMenuItem.prototype
.copy
= function () {
721 var o
= new ContextMenuItem ();
723 o
.caption
= this.caption
;
724 o
.onSelect
= this.onSelect
;
725 o
.separatorBefore
= this.separatorBefore
;
726 o
.enabled
= this.enabled
;
727 o
.visible
= this.visible
;
732 ASSetPropFlags
(ContextMenuItem.prototype
, null, 1027);
737 flash
.net
.FileReference = function () {
738 var c
= ASnative
(2204, 200);
740 this._listeners
= [];
743 AsBroadcaster
.initialize
(flash
.net
.FileReference.prototype
);
744 ASSetNative
(flash
.net
.FileReference.prototype
, 2204, "8browse,8upload,8download,8cancel");
745 ASSetPropFlags
(flash
.net
.FileReference.prototype
, null, 3);
747 /* FileReferenceList */
749 flash
.net
.FileReferenceList = function () {
750 this.fileList
= new Array();
751 this._listeners
= [];
754 AsBroadcaster
.initialize
(flash
.net
.FileReferenceList.prototype
);
755 ASSetNative
(flash
.net
.FileReferenceList.prototype
, 2205, "8browse");
756 ASSetPropFlags
(flash
.net
.FileReferenceList.prototype
, null, 3);
758 /* LocalConnection */
760 function LocalConnection () {
763 ASSetNative
(LocalConnection.prototype
, 2200, "6connect,6send,6close,6domain");
764 ASSetPropFlags
(LocalConnection.prototype
, null, 3);
768 function Microphone () {
771 Microphone.get = function (index
) {
772 var get_func
= ASnative
(2104, 200);
773 return get_func
(index
);
775 Microphone.addProperty
("names", ASnative
(2104, 201), null);
776 ASSetNative
(Microphone.prototype
, 2104, "6setSilenceLevel,6setRate,6setGain,6setUseEchoSuppression");
777 ASSetPropFlags
(Microphone.prototype
, null, 3);
781 PrintJob = ASconstructor
(111, 0);
782 ASSetNative
(PrintJob.prototype
, 111, "7start,7addPage,7send", 100);
783 ASSetPropFlags
(PrintJob.prototype
, null, 1027);
788 ASSetNative
(Selection
, 600, "getBeginIndex,getEndIndex,getCaretIndex,getFocus,setFocus,setSelection");
789 AsBroadcaster
.initialize
(Selection
);
790 ASSetPropFlags
(Selection
, null, 7);
795 flash
.text
.TextRenderer = ASconstructor
(2150, 0);
797 ASSetNative
(flash
.text
.TextRenderer, 2150, "8setAdvancedAntialiasingTable", 1);
798 ASSetNativeAccessor
(flash
.text
.TextRenderer, 2150, "8maxLevel", 4);
799 ASSetNativeAccessor
(flash
.text
.TextRenderer, 2150, "8displayMode", 10);
801 textRenderer
= flash
.text
.TextRenderer; // awesome
805 function XMLSocket () {
808 XMLSocket.prototype
.onData
= function (src
) {
809 this.onXML
(new XML (src
));
812 ASSetNative
(XMLSocket.prototype
, 400, "connect,send,close");
813 ASSetPropFlags
(XMLSocket.prototype
, null, 3);
819 flash
.geom
.Point = function () {
820 if (arguments.length
== 0) {
824 // Note: we don't check for length == 1
825 this.x
= arguments[0];
826 this.y
= arguments[1];
830 flash
.geom
.Point.distance
= function (a
, b
) {
831 return a
.subtract
(b
).length
;
834 flash
.geom
.Point.interpolate
= function (a
, b
, value
) {
835 return new flash
.geom
.Point (b
.x
+ value
* (a
.x
- b
.x
),
836 b
.y
+ value
* (a
.y
- b
.y
));
839 flash
.geom
.Point.polar
= function (length
, angle
) {
840 return new flash
.geom
.Point (length
* Math.cos
(angle
),
841 length
* Math.sin
(angle
));
844 flash
.geom
.Point.prototype
.addProperty
("length",
845 function () { return Math.sqrt
(this.x
* this.x
+ this.y
* this.y
); },
848 flash
.geom
.Point.prototype
.add
= function (other
) {
849 return new flash
.geom
.Point (this.x
+ other
.x
, this.y
+ other
.y
);
852 flash
.geom
.Point.prototype
.clone
= function () {
853 return new flash
.geom
.Point (this.x
, this.y
);
856 flash
.geom
.Point.prototype
.equals
= function (other
) {
857 if (!other instanceOf flash
.geom
.Point)
860 return (other
.x
== this.x
&& other
.y
== this.y
);
863 flash
.geom
.Point.prototype
.normalize
= function (length
) {
864 if (this.length
<= 0)
867 var factor
= length
/ this.length
;
868 this.x
= this.x
* factor
;
869 this.y
= this.y
* factor
;
872 flash
.geom
.Point.prototype
.subtract
= function (other
) {
873 return new flash
.geom
.Point (this.x
- other
.x
, this.y
- other
.y
);
876 flash
.geom
.Point.prototype
.offset
= function (x
, y
) {
881 flash
.geom
.Point.prototype
.toString
= function () {
882 return "(x=" + this.x
+ ", y=" + this.y
+ ")";
887 flash
.geom
.Rectangle = function (x
, y
, width
, height
) {
888 if (arguments.length
== 0) {
894 this.height
= height
;
898 flash
.geom
.Rectangle.prototype
.clone
= function () {
899 return new flash
.geom
.Rectangle (this.x
, this.y
, this.width
, this.height
);
902 flash
.geom
.Rectangle.prototype
.toString
= function () {
903 return "(x=" + this.x
+ ", y=" + this.y
+ ", w=" + this.width
+ ", h=" + this.height
+ ")";
906 flash
.geom
.Rectangle.prototype
.equals
= function (rect
) {
907 return (rect
instanceof flash
.geom
.Rectangle &&
908 this.x
== rect
.x
&& this.y
== rect
.y
&&
909 this.width
== rect
.width
&& this.height
== rect
.height
);
912 flash
.geom
.Rectangle.prototype
.contains
= function (x
, y
) {
913 return (this.x
<= x
&& this.y
<= y
&&
914 this.x
+ this.width
> x
&& this.y
+ this.height
> y
);
917 flash
.geom
.Rectangle.prototype
.containsPoint
= function (point
) {
918 return (this.x
<= point
.x
&& this.y
<= point
.y
&&
919 this.x
+ this.width
> point
.x
&& this.y
+ this.height
> point
.y
);
922 flash
.geom
.Rectangle.prototype
.containsRectangle
= function (rect
) {
923 var tr
= this.x
+ this.width
;
924 var tb
= this.y
+ this.height
;
925 var rr
= rect
.x
+ rect
.width
;
926 var rb
= rect
.y
+ rect
.height
;
927 return (rect
.x
>= this.x
&& rect
.x
< tr
&& rect
.y
>= this.y
&& rect
.y
< tb
&&
928 rr
> this.x
&& rr
<= tr
&& rb
> this.y
&& rb
<= tb
);
931 flash
.geom
.Rectangle.prototype
.isEmpty
= function () {
932 return (this.width
<= 0 || this.height
<= 0);
935 flash
.geom
.Rectangle.prototype
.setEmpty
= function () {
942 flash
.geom
.Rectangle.prototype
.intersection
= function (rect
) {
943 var ints
= new flash
.geom
.Rectangle ();
945 if (this.isEmpty
() || rect
.isEmpty
()) {
950 ints
.x
= Math.max
(this.x
, rect
.x
);
951 ints
.y
= Math.max
(this.y
, rect
.y
);
952 ints
.width
= Math.min
(this.x
+ this.width
, rect
.x
+ rect
.width
) - ints
.x
;
953 ints
.height
= Math.min
(this.y
+ this.height
, rect
.y
+ rect
.height
) - ints
.y
;
955 if (ints
.width
<= 0 || ints
.height
<= 0)
961 flash
.geom
.Rectangle.prototype
.intersects
= function (rect
) {
962 return !this.intersection
(rect
).isEmpty
();
965 flash
.geom
.Rectangle.prototype
.union
= function (rect
) {
967 return rect
.clone
();
970 return this.clone
();
972 var union
= new flash
.geom
.Rectangle ();
973 union
.x
= Math.min
(this.x
, rect
.x
);
974 union
.y
= Math.min
(this.y
, rect
.y
);
975 union
.width
= Math.max
(this.x
+ this.width
, rect
.x
+ rect
.width
) - union
.x
;
977 Math.max
(this.y
+ this.height
, rect
.y
+ rect
.height
) - union
.y
;
982 flash
.geom
.Rectangle.prototype
.offset
= function (dx
, dy
) {
987 flash
.geom
.Rectangle.prototype
.offsetPoint
= function (d
) {
992 flash
.geom
.Rectangle.prototype
.inflate
= function (dx
, dy
) {
994 this.width
+= 2 * dx
;
997 this.height
+= 2 * dy
;
1000 flash
.geom
.Rectangle.prototype
.inflatePoint
= function (d
) {
1002 this.width
+= 2 * d
.x
;
1005 this.height
+= 2 * d
.y
;
1008 flash
.geom
.Rectangle.prototype
.addProperty
("left",
1013 this.width
+= this.x
- left
;
1018 flash
.geom
.Rectangle.prototype
.addProperty
("right",
1020 return this.x
+ this.width
;
1023 this.width
= right
- this.x
;
1027 flash
.geom
.Rectangle.prototype
.addProperty
("top",
1032 this.height
+= this.y
- top
;
1037 flash
.geom
.Rectangle.prototype
.addProperty
("bottom",
1039 return this.y
+ this.height
;
1042 this.height
= bottom
- this.y
;
1046 flash
.geom
.Rectangle.prototype
.addProperty
("topLeft",
1048 return new flash
.geom
.Point (this.x
, this.y
);
1050 function (topLeft
) {
1051 this.width
+= this.x
- topLeft
.x
;
1052 this.height
+= this.y
- topLeft
.y
;
1058 flash
.geom
.Rectangle.prototype
.addProperty
("bottomRight",
1060 return new flash
.geom
.Point (this.x
+ this.width
, this.y
+ this.height
);
1062 function (bottomRight
) {
1063 this.width
= bottomRight
.x
- this.x
;
1064 this.height
= bottomRight
.y
- this.y
;
1068 flash
.geom
.Rectangle.prototype
.addProperty
("size",
1070 return new flash
.geom
.Point (this.width
, this.height
);
1073 this.width
= size
.x
;
1074 this.height
= size
.y
;
1080 flash
.geom
.Matrix = function (pa
, pb
, pc
, pd
, ptx
, pty
) {
1081 if (!arguments.length
) {
1093 flash
.geom
.Matrix.prototype
.clone
= function () {
1094 return new flash
.geom
.Matrix (this.a
, this.b
, this.c
, this.d
, this.tx
,
1098 flash
.geom
.Matrix.prototype
.concat
= function (other
) {
1099 var a
= this.a
* other
.a
;
1100 var d
= this.d
* other
.d
;
1103 var tx
= this.tx
* other
.a
+ other
.tx
;
1104 var ty
= this.ty
* other
.d
+ other
.ty
;
1105 if (this.b
!= 0 || this.c
!= 0 || other
.b
!= 0 || other
.c
!= 0) {
1106 a
+= this.b
* other
.c
;
1107 d
+= this.c
* other
.b
;
1108 b
= this.a
* other
.b
+ this.b
* other
.d
;
1109 c
= this.c
* other
.a
+ this.d
* other
.c
;
1110 tx
+= this.ty
* other
.c
;
1111 ty
+= this.tx
* other
.b
;
1121 flash
.geom
.Matrix.prototype
.createBox
= function (scaleX
, scaleY
, rotation
, x
, y
) {
1123 this.rotate
(arguments.length
> 2 ? rotation
: 0);
1124 this.scale
(scaleX
, scaleY
);
1125 if (arguments.length
> 3)
1127 if (arguments.length
> 4)
1131 flash
.geom
.Matrix.prototype
.createGradientBox
= function (width
, height
, rotation
, x
, y
) {
1132 this.createBox
(width
/ 1638.4, height
/ 1638.4,
1133 arguments.length
> 2 ? rotation
: 0,
1134 (arguments.length
> 3 ? x
: 0) + width
/ 2,
1135 (arguments.length
> 4 ? y
: 0) + height
/ 2);
1138 flash
.geom
.Matrix.prototype
.deltaTransformPoint
= function (p
) {
1139 return new flash
.geom
.Point (this.a
* p
.x
+ this.c
* p
.y
, this.d
* p
.y
+ this.b
* p
.x
);
1142 flash
.geom
.Matrix.prototype
.identity
= function () {
1143 this.a
= this.d
= 1;
1144 this.b
= this.c
= this.tx
= this.ty
= 0;
1147 flash
.geom
.Matrix.prototype
.invert
= function () {
1148 if (this.b
== 0 && this.c
== 0) {
1149 this.a
= 1 / this.a
;
1150 this.d
= 1 / this.d
;
1151 this.b
= this.c
= 0;
1152 this.tx
= -this.a
* this.tx
;
1153 this.ty
= -this.d
* this.ty
;
1161 var det
= a
* d
- b
* c
;
1172 var p
= this.deltaTransformPoint
(new flash
.geom
.Point(this.tx
, this.ty
));
1177 flash
.geom
.Matrix.prototype
.rotate
= function (amount
) {
1178 var cos
= Math.cos
(amount
);
1179 var sin
= Math.sin
(amount
);
1180 this.concat
(new flash
.geom
.Matrix (cos
, sin
, -sin
, cos
, 0, 0));
1183 flash
.geom
.Matrix.prototype
.scale
= function (x
, y
) {
1184 this.concat
(new flash
.geom
.Matrix (x
, 0, 0, y
, 0, 0));
1187 flash
.geom
.Matrix.prototype
.transformPoint
= function (p
) {
1188 return new flash
.geom
.Point (this.a
* p
.x
+ this.c
* p
.y
+ this.tx
, this.d
* p
.y
+ this.b
* p
.x
+ this.ty
);
1191 flash
.geom
.Matrix.prototype
.translate
= function (dx
, dy
) {
1197 flash
.geom
.Matrix.prototype
.toString
= function () {
1198 return "(a=" + this.a
+ ", b=" + this.b
+ ", c=" + this.c
+ ", d=" + this.d
+
1199 ", tx=" + this.tx
+ ", ty=" + this.ty
+ ")";
1202 /* ColorTransform */
1204 flash
.geom
.ColorTransform = ASconstructor
(1105, 0);
1206 flash
.geom
.ColorTransform.prototype
.toString
= function () {
1207 return "(redMultiplier=" + this.redMultiplier
+
1208 ", greenMultiplier=" + this.greenMultiplier
+
1209 ", blueMultiplier=" + this.blueMultiplier
+
1210 ", alphaMultiplier=" + this.alphaMultiplier
+
1211 ", redOffset=" + this.redOffset
+
1212 ", greenOffset=" + this.greenOffset
+
1213 ", blueOffset=" + this.blueOffset
+
1214 ", alphaOffset=" + this.alphaOffset
+ ")";
1217 ASSetNative
(flash
.geom
.ColorTransform.prototype
, 1105, "8concat", 1);
1218 ASSetNativeAccessor
(flash
.geom
.ColorTransform.prototype
, 1105, "8alphaMultiplier,8redMultiplier,8greenMultiplier,8blueMultiplier,8alphaOffset,8redOffset,8greenOffset,8blueOffset,8rgb", 101);
1222 flash
.geom
.Transform = ASconstructor
(1106, 0);
1224 ASSetNativeAccessor
(flash
.geom
.Transform.prototype
, 1106, "8matrix,8concatenatedMatrix,8colorTransform,8concatenatedColorTransform,8pixelBounds", 101);
1229 flash
.display
.BitmapData = ASconstructor
(1100, 0);
1231 flash
.display
.BitmapData.RED_CHANNEL
= 1;
1232 flash
.display
.BitmapData.GREEN_CHANNEL
= 2;
1233 flash
.display
.BitmapData.BLUE_CHANNEL
= 4;
1234 flash
.display
.BitmapData.ALPHA_CHANNEL
= 8;
1236 ASSetNative
(flash
.display
.BitmapData, 1100, "8loadBitmap", 40);
1238 ASSetNative
(flash
.display
.BitmapData.prototype
, 1100, "8getPixel,8setPixel,8fillRect,8copyPixels,8applyFilter,8scroll,8threshold,8draw,8pixelDissolve,8getPixel32,8setPixel32,8floodFill,8getColorBoundsRect,8perlinNoise,8colorTransform,8hitTest,8paletteMap,8merge,8noise,8copyChannel,8clone,8dispose,8generateFilterRect,8compare", 1);
1239 ASSetNativeAccessor
(flash
.display
.BitmapData.prototype
, 1100, "8width,8height,8rectangle,8transparent", 100);
1241 /* ExternalInterface */
1243 flash
.external
= {};
1245 flash
.external
.ExternalInterface = function () {
1248 flash
.external
.ExternalInterface.addCallback
= function (name
, instance
, method
) {
1249 if (!method
|| !flash
.external
.ExternalInterface.available
)
1252 flash
.external
.ExternalInterface._initJS
();
1253 return flash
.external
.ExternalInterface._addCallback
(name
, function (request
) {
1254 return flash
.external
.ExternalInterface._callIn
(instance
, method
, request
);
1258 flash
.external
.ExternalInterface.call
= function (name
) {
1259 if (!flash
.external
.ExternalInterface.available
)
1262 flash
.external
.ExternalInterface._initJS
();
1263 var request
= "try { ";
1264 var id
= flash
.external
.ExternalInterface._objectID
();
1266 request
+= id
+ ".SetReturnValue(";
1267 request
+= "__flash__toXML (" + name
+ "(";
1268 for (var i
= 1; i
< arguments.length
; i
++) {
1271 request
+= flash
.external
.ExternalInterface._toJS
(arguments[i
]);
1276 request
+= "; } catch (e) { ";
1278 request
+= id
+ ".SetReturnValue(\"<undefined/>\"); }";
1280 request
+= "\"<undefined/>\"; }";
1282 var result
= flash
.external
.ExternalInterface._evalJS
(request
);
1283 if (result
== null) {
1284 request
= "<invoke name=\"" + name
+ "\" returntype=\"xml\">" + flash
.external
.ExternalInterface._argumentsToXML
(arguments) + "</invoke>";
1285 result
= flash
.external
.ExternalInterface._callOut
(request
);
1290 var xml
= new XML ();
1291 xml
.ignoreWhite
= true;
1292 xml
.parseXML
(result
);
1293 return flash
.external
.ExternalInterface._toAS
(xml
.firstChild
);
1296 flash
.external
.ExternalInterface._callIn
= function (instance
, method
, request
) {
1297 var xml
= new XML();
1298 xml
.ignoreWhite
= true;
1299 xml
.parseXML
(request
);
1301 for (var i
= 0; i
< xml
.firstChild
.childNodes
.length
; i
++) {
1302 if (xml
.firstChild
.childNodes
[i
].nodeName
== "arguments") {
1303 args
= xml
.firstChild
.childNodes
[i
];
1307 var result
= method
.apply
(instance
, flash
.external
.ExternalInterface._argumentsToAS
(args
));
1308 if (xml
.firstChild
.attributes
.returntype
== "javascript")
1309 return flash
.external
.ExternalInterface._toJS
(result
);
1311 return flash
.external
.ExternalInterface._toXML
(result
);
1314 flash
.external
.ExternalInterface._arrayToXML
= function (array
) {
1316 for (var i
= 0; i
< array
.length
; i
++) {
1317 s
+= "<property id=\"" + i
+ "\">" + flash
.external
.ExternalInterface._toXML
(array
[i
]) + "</property>";
1319 return s
+ "</array>";
1322 flash
.external
.ExternalInterface._argumentsToXML
= function (args
) {
1323 var s
= "<arguments>";
1324 for (var i
= 0; i
< args
.length
; i
++) {
1325 s
+= flash
.external
.ExternalInterface._toXML
(args
[i
]);
1327 return s
+ "</arguments>";
1330 flash
.external
.ExternalInterface._objectToXML
= function (obj
) {
1332 for (var prop
in obj
) {
1333 s
+= "<property id=\"" + prop
+ "\">" + flash
.external
.ExternalInterface._toXML
(obj
[prop
]) + "</property>";
1335 return s
+ "</object>";
1338 flash
.external
.ExternalInterface._toXML
= function (value
) {
1339 var type
= typeof(value
);
1340 if (type
== "string") {
1341 return "<string>" + flash
.external
.ExternalInterface._escapeXML
(value
) + "</string>";
1342 } else if (type
== "undefined") {
1343 return "<undefined/>";
1344 } else if (type
== "number") {
1345 return "<number>" + value
+ "</number>";
1346 } else if (value
== null) {
1348 } else if (type
== "boolean") {
1349 return value
? "<true/>" : "<false/>";
1350 } else if (value
.hasOwnProperty
("length")) {
1351 return flash
.external
.ExternalInterface._arrayToXML
(value
);
1352 } else if (type
== "object") {
1353 return flash
.external
.ExternalInterface._objectToXML
(value
);
1359 flash
.external
.ExternalInterface._objectToAS
= function (xml
) {
1361 for (i
= 0; i
< xml
.childNodes
.length
; i
++) {
1362 if (xml
.childNodes
[i
].nodeName
== "property")
1363 o
[xml
.childNodes
[i
].attributes
.id
] = flash
.external
.ExternalInterface._toAS
(xml
.childNodes
[i
].firstChild
);
1368 flash
.external
.ExternalInterface._arrayToAS
= function (xml
) {
1370 for (i
= 0; i
< xml
.childNodes
.length
; i
++) {
1371 if (xml
.childNodes
[i
].nodeName
== "property")
1372 a
[xml
.childNodes
[i
].attributes
.id
] = flash
.external
.ExternalInterface._toAS
(xml
.childNodes
[i
].firstChild
);
1377 flash
.external
.ExternalInterface._toAS
= function (xml
) {
1378 var type
= xml
.nodeName
;
1379 if (type
== "number") {
1380 return Number (xml
.firstChild
.toString
());
1381 } else if (type
== "string") {
1382 return flash
.external
.ExternalInterface._unescapeXML
(String (xml
.firstChild
));
1383 } else if (type
== "false") {
1385 } else if (type
== "true") {
1387 } else if (type
== "null") {
1389 } else if (type
== "undefined") {
1391 } else if (type
== "object") {
1392 return flash
.external
.ExternalInterface._objectToAS
(xml
);
1393 } else if (type
== "array") {
1394 return flash
.external
.ExternalInterface._arrayToAS
(xml
);
1395 } else if (type
== "class") {
1396 return String (xml
.firstChild
);
1402 flash
.external
.ExternalInterface._argumentsToAS
= function (xml
) {
1404 for (var i
= 0; i
< xml
.childNodes
.length
; i
++) {
1405 args
.push
(flash
.external
.ExternalInterface._toAS
(xml
.childNodes
[i
]));
1410 flash
.external
.ExternalInterface._arrayToJS
= function (array
) {
1412 for (var i
= 0; i
< array
.length
; i
++) {
1415 s
+= flash
.external
.ExternalInterface._toJS
(array
[_l1
]);
1420 flash
.external
.ExternalInterface._objectToJS
= function (obj
) {
1422 var needs_comma
= false;
1423 for (var prop
in obj
) {
1428 s
+= prop
+ ":" + flash
.external
.ExternalInterface._toJS
(obj
[prop
]);
1433 flash
.external
.ExternalInterface._toJS
= function (value
) {
1434 var type
= typeof (value
);
1435 if (type
== "string") {
1436 return "\"" + flash
.external
.ExternalInterface._jsQuoteString
(flash
.external
.ExternalInterface._unescapeXML
(value
)) + "\"";
1437 } else if (type
== "object") {
1438 if (value
instanceof Array) {
1439 return flash
.external
.ExternalInterface._arrayToJS
(value
);
1441 return flash
.external
.ExternalInterface._objectToJS
(value
);
1444 return String (value
);
1448 ASSetNative
(flash
.external
.ExternalInterface, 14, "8_initJS,8_objectID,8_addCallback,8_evalJS,8_callOut,8_escapeXML,8_unescapeXML,8_jsQuoteString");
1449 ASSetNativeAccessor
(flash
.external
.ExternalInterface, 14, "8available", 100);
1451 ASSetPropFlags
(flash
.external
.ExternalInterface, null, 4103);
1455 function SharedObject () {
1458 SharedObject.deleteAll
= function () {
1459 var o
= {}; o
["Implement SharedObject.deleteAll (static)"] ();
1462 SharedObject.getDiskUsage
= function () {
1463 var o
= {}; o
["Implement SharedObject.getDiskUsage (static)"] ();
1466 SharedObject.getLocal
= function () {
1467 var o
= {}; o
["Implement SharedObject.getLocal (static)"] ();
1470 SharedObject.getRemote
= function () {
1471 var o
= {}; o
["Implement SharedObject.getRemote (static)"] ();
1474 ASSetPropFlags
(SharedObject, "deleteAll,getDiskUsage", 1);
1476 ASSetNative
(SharedObject.prototype
, 2106, "6connect,6send,6flush,6close,6getSize,6setFps,6clear");
1477 ASSetPropFlags
(SharedObject.prototype
, null, 3);
1481 /* This function added new Error classes in Flash player 7, in Flash player 9
1482 * it seems to be just broken, we just call new Error based on the number of
1483 * ,-characters in the given string */
1484 function AsSetupError
(names
) {
1485 var count
= names
.split
(",").length
;
1486 for (var i
= 0; i
< count
; i
++) {
1487 var tmp
= new Error ();
1491 /* RemoteLSOUsage */
1493 function RemoteLSOUsage
() {
1496 RemoteLSOUsage
.getURLPageSupport
= function () {
1497 var o
= {}; o
["Implement RemoteLSOUsage.getURLPageSupport (static)"] ();
1499 ASSetPropFlags
(RemoteLSOUsage
, "getURLPageSupport", 1);
1503 Button = ASconstructor
(105, 0);
1505 Button.prototype
.useHandCursor
= true;
1506 Button.prototype
.enabled
= true;
1508 Button.prototype
.getDepth
= ASnative
(105, 3);
1509 ASSetNativeAccessor
(Button.prototype
, 105, "8scale9Grid,8filters,8cacheAsBitmap,8blendMode", 4);
1510 // FIXME: this should be done inside the Button constructor
1511 ASSetNativeAccessor
(Button.prototype
, 900, "8tabIndex", 200);
1517 flash
.filters
.BitmapFilter = ASconstructor
(1112, 0);
1519 ASSetNative
(flash
.filters
.BitmapFilter.prototype
, 1112, "8clone", 1);
1523 flash
.filters
.BevelFilter = ASconstructor
(1107, 0);
1524 flash
.filters
.BevelFilter.prototype
= new flash
.filters
.BitmapFilter ();
1525 delete flash
.filters
.BevelFilter.prototype
.constructor
;
1527 ASSetNativeAccessor
(flash
.filters
.BevelFilter.prototype
, 1107, "8distance,8angle,8highlightColor,8highlightAlpha,8shadowColor,8shadowAlpha,8quality,8strength,8knockout,8blurX,8blurY,8type", 1);
1531 flash
.filters
.BlurFilter = ASconstructor
(1102, 0);
1532 flash
.filters
.BlurFilter.prototype
= new flash
.filters
.BitmapFilter ();
1533 delete flash
.filters
.BlurFilter.prototype
.constructor
;
1535 ASSetNativeAccessor
(flash
.filters
.BlurFilter.prototype
, 1102, "8blurX,8blurY,8quality", 1);
1537 /* ColorMatrixFilter */
1539 flash
.filters
.ColorMatrixFilter = ASconstructor
(1110, 0);
1540 flash
.filters
.ColorMatrixFilter.prototype
= new flash
.filters
.BitmapFilter ();
1541 delete flash
.filters
.ColorMatrixFilter.prototype
.constructor
;
1543 ASSetNativeAccessor
(flash
.filters
.ColorMatrixFilter.prototype
, 1110, "8matrix", 1);
1545 /* ConvolutionFilter */
1547 flash
.filters
.ConvolutionFilter = ASconstructor
(1109, 0);
1548 flash
.filters
.ConvolutionFilter.prototype
= new flash
.filters
.BitmapFilter ();
1549 delete flash
.filters
.ConvolutionFilter.prototype
.constructor
;
1551 ASSetNativeAccessor
(flash
.filters
.ConvolutionFilter.prototype
, 1109, "8matrixX,8matrixY,8matrix,8divisor,8bias,8preserveAlpha,8clamp,8color,8alpha", 1);
1553 /* DisplacementMapFilter */
1555 flash
.filters
.DisplacementMapFilter = ASconstructor
(1111, 0);
1556 flash
.filters
.DisplacementMapFilter.prototype
= new flash
.filters
.BitmapFilter ();
1557 delete flash
.filters
.DisplacementMapFilter.prototype
.constructor
;
1559 ASSetNativeAccessor
(flash
.filters
.DisplacementMapFilter.prototype
, 1111, "8mapBitmap,8mapPoint,8componentX,8componentY,8scaleX,8scaleY,8mode,8color,8alpha", 1);
1561 /* DropShadowFilter */
1563 flash
.filters
.DropShadowFilter = ASconstructor
(1101, 0);
1564 flash
.filters
.DropShadowFilter.prototype
= new flash
.filters
.BitmapFilter();
1565 delete flash
.filters
.DropShadowFilter.prototype
.constructor
;
1567 ASSetNativeAccessor
(flash
.filters
.DropShadowFilter.prototype
, 1101, "8distance,8angle,8color,8alpha,8quality,8inner,8knockout,8blurX,8blurY,8strength,8hideObject", 1);
1571 flash
.filters
.GlowFilter = ASconstructor
(1103, 0);
1572 flash
.filters
.GlowFilter.prototype
= new flash
.filters
.BitmapFilter ();
1573 delete flash
.filters
.GlowFilter.prototype
.constructor
;
1575 ASSetNativeAccessor
(flash
.filters
.GlowFilter.prototype
, 1103, "8color,8alpha,8quality,8inner,8knockout,8blurX,8blurY,8strength", 1);
1577 /* GradientBevelFilter */
1579 flash
.filters
.GradientBevelFilter = ASconstructor
(1108, 1000);
1580 flash
.filters
.GradientBevelFilter.prototype
= new flash
.filters
.BitmapFilter ();
1581 delete flash
.filters
.GradientBevelFilter.prototype
.constructor
;
1583 ASSetNativeAccessor
(flash
.filters
.GradientBevelFilter.prototype
, 1108, "8distance,8angle,8colors,8alphas,8ratios,8blurX,8blurY,8quality,8strength,8knockout,8type", 1);
1585 /* GradientGlowFilter */
1587 flash
.filters
.GradientGlowFilter = ASconstructor
(1108, 0);
1588 flash
.filters
.GradientGlowFilter.prototype
= o
= new flash
.filters
.BitmapFilter ();
1589 delete flash
.filters
.GradientGlowFilter.prototype
.constructor
;
1590 ASSetNativeAccessor
(flash
.filters
.GradientGlowFilter.prototype
, 1108, "8distance,8angle,8colors,8alphas,8ratios,8blurX,8blurY,8quality,8strength,8knockout,8type", 1);
1592 /* Global Functions */
1594 setInterval
= ASnative
(250, 0);
1595 clearInterval
= ASnative
(250, 1);
1596 setTimeout
= ASnative
(250, 2);
1597 clearTimeout
= clearInterval
;
1598 showRedrawRegions
= ASnative
(1021, 1);
1599 trace
= ASnative
(100, 4);
1600 updateAfterEvent
= ASnative
(9, 0);
1602 /*** OH THE HUMANITY ***/
1606 /*** Set propflags that would have interfered with running this script */
1608 ASSetPropFlags
(this, "flash", 4096);
1609 ASSetPropFlags
(Object, "addProperty", 128);
1610 ASSetPropFlags
(AsBroadcaster
, null, 131);
1612 /*** GLOBAL PROPFLAGS */
1614 ASSetPropFlags
(this, null, 1, 6);