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
21 /*** IMPORTANT NOTE ***/
23 /* Function definitions like this:
25 * does not work, because those are set on the original target, and the target
26 * is a MovieClip, which doesn't exist when init scripts are run.
28 * foo = function () {};
33 ASSetPropFlags
= ASnative
(1, 0);
34 ASSetNative
= ASnative
(4, 0);
35 ASSetNativeAccessor
= ASnative
(4, 1);
40 /* Only Flash extensions here, rest to swfdec_as_initialize.as */
42 Object.registerClass
= ASnative
(101, 8);
43 ASSetPropFlags
(Object, null, 7);
45 // so we can use it in this script
46 ASSetPropFlags
(Object, "addProperty", 0, 128);
50 Error = function (msg
) {
51 if (typeof (msg
) != "undefined")
54 Error.prototype
.name
= Error.prototype
.message
= "Error";
55 Error.prototype
.toString
= function () {
59 /*** ASBROADCASTER ***/
61 AsBroadcaster
= function () { };
63 AsBroadcaster
.broadcastMessage
= ASnative
(101, 12);
65 AsBroadcaster
.addListener
= function (x
) {
66 this.removeListener
(x
);
67 this._listeners
.push
(x
);
71 AsBroadcaster
.removeListener
= function (x
) {
72 var l
= this._listeners
;
75 for (var i
= 0; i
< l
.length
; i
++) {
84 AsBroadcaster
.initialize
= function (o
) {
85 o
.broadcastMessage
= ASnative
(101, 12);
86 o
.addListener
= AsBroadcaster
.addListener
;
87 o
.removeListener
= AsBroadcaster
.removeListener
;
89 ASSetPropFlags
(o
, "broadcastMessage,addListener,removeListener,_listeners", 131);
92 Key
= { ALT
: 18, BACKSPACE
: 8, CAPSLOCK
: 20, CONTROL
: 17, DELETEKEY
: 46,
93 DOWN
: 40, END
: 35, ENTER
: 13, ESCAPE
: 27, HOME
: 36, INSERT
: 45, LEFT
: 37,
94 PGDN
: 34, PGUP
: 33, RIGHT
: 39, SHIFT
: 16, SPACE
: 32, TAB
: 9, UP
: 38 };
95 ASSetNative
(Key
, 800, "getAscii,getCode,isDown,isToggled,isAccessible");
96 AsBroadcaster
.initialize
(Key
);
97 ASSetPropFlags
(Key
, null, 7);
102 Mouse.show
= ASnative
(5, 0);
103 Mouse.hide
= ASnative
(5, 1);
104 AsBroadcaster
.initialize
(Mouse);
105 ASSetPropFlags
(Mouse, null, 7);
110 AsBroadcaster
.initialize
(Stage);
111 ASSetNativeAccessor
(Stage, 666, "scaleMode,align,width,height,showMenu,displayState", 1);
112 ASSetNativeAccessor
(Stage, 666, "9fullScreenSourceRect,9fullScreenHeight,9fullScreenWidth", 100);
114 /*** NetConnection ***/
116 // FIXME: this should actually be a non-native function that calls the ASnative
118 NetConnection = ASconstructor
(2100, 200);
120 ASSetNative
(NetConnection.prototype
, 2100, "6connect,6close,6call,6addHeader");
121 NetConnection.prototype
.addProperty
("connectedProxyType", ASnative
(2100, 4), null);
122 NetConnection.prototype
.proxyType
= "none";
123 NetConnection.prototype
.addProperty
("usingTLS", ASnative
(2100, 5), null);
124 ASSetPropFlags
(NetConnection.prototype
, null, 3);
128 NetStream.prototype
.publish
= function () {
129 var o
= {}; o
["Implement NetStream.publish"] ();
132 NetStream.prototype
.receiveAudio
= function (flag
) {
133 var o
= {}; o
["Implement NetStream.receiveAudio"] ();
136 NetStream.prototype
.receiveVideo
= function (flag
) {
137 var o
= {}; o
["Implement NetStream.receiveVideo"] ();
140 ASSetNative
(NetStream.prototype
, 2101, "6close,6attachAudio,6attachVideo,6send,6setBufferTime");
141 ASSetNativeAccessor
(NetStream.prototype
, 2101, "checkPolicyFile", 5);
142 ASSetPropFlags
(NetStream.prototype
, null, 3);
146 XMLNode = ASconstructor
(253, 0);
148 XMLNode.prototype
.cloneNode
= ASnative
(253, 1);
149 XMLNode.prototype
.removeNode
= ASnative
(253, 2);
150 XMLNode.prototype
.insertBefore
= ASnative
(253, 3);
151 XMLNode.prototype
.appendChild
= ASnative
(253, 4);
152 XMLNode.prototype
.hasChildNodes
= ASnative
(253, 5);
153 XMLNode.prototype
.toString
= ASnative
(253, 6);
154 XMLNode.prototype
.getNamespaceForPrefix
= ASnative
(253, 7);
155 XMLNode.prototype
.getPrefixForNamespace
= ASnative
(253, 8);
159 XML = ASconstructor
(253, 9);
161 XML.prototype
= new XMLNode (1, "");
162 delete XML.prototype
.constructor
;
163 ASSetPropFlags
(XML, "prototype", 3);
165 XML.prototype
.load
= ASnative
(301, 0);
166 XML.prototype
.send
= ASnative
(301, 1);
167 XML.prototype
.sendAndLoad
= ASnative
(301, 2);
168 XML.prototype
.createElement
= ASnative
(253, 10);
169 XML.prototype
.createTextNode
= ASnative
(253, 11);
170 XML.prototype
.parseXML
= ASnative
(253, 12);
172 XML.prototype
.onLoad
= function () {
175 // Note: handling of loaded is different here than in LoadVars
176 XML.prototype
.onData
= function (src
) {
187 XML.prototype
.getBytesLoaded
= function () {
188 return this._bytesLoaded
;
191 XML.prototype
.getBytesTotal
= function () {
192 return this._bytesTotal
;
195 XML.prototype
.addRequestHeader
= function (key
, value
) {
196 if (typeof (this._customHeaders
) == "undefined") {
197 this._customHeaders
= new Array ();
198 ASSetPropFlags
(this, "_customHeaders", 131);
200 if (typeof (key
) == "string" && typeof (value
) == "string") {
201 this._customHeaders
.push
(key
, value
);
202 } else if (key
instanceof Array) {
203 for (var i
= 0; i
+ 1 < key
.length
; i
+= 2) {
204 this.addRequestHeader
(key
[i
], key
[i
+ 1]);
211 LoadVars
= function () { };
213 LoadVars
.prototype
.contentType
= "application/x-www-form-urlencoded";
215 LoadVars
.prototype
.load
= ASnative
(301, 0);
216 LoadVars
.prototype
.send
= ASnative
(301, 1);
217 LoadVars
.prototype
.sendAndLoad
= ASnative
(301, 2);
218 LoadVars
.prototype
.decode
= ASnative
(301, 3);
220 LoadVars
.prototype
.onLoad
= function () {
223 LoadVars
.prototype
.onData
= function (src
) {
233 LoadVars
.prototype
.toString
= function () {
235 for (var x
in this) {
236 a
.push
(escape
(x
) + "=" + escape
(this[x
]));
241 LoadVars
.prototype
.getBytesLoaded
= function () {
242 return this._bytesLoaded
;
245 LoadVars
.prototype
.getBytesTotal
= function () {
246 return this._bytesTotal
;
249 // Duplicated from XML
250 // Just using the same function here fails loadvars-properties test
251 LoadVars
.prototype
.addRequestHeader
= function (key
, value
) {
252 if (typeof (this._customHeaders
) == "undefined") {
253 this._customHeaders
= new Array ();
254 ASSetPropFlags
(this, "_customHeaders", 131);
256 if (typeof (key
) == "string" && typeof (value
) == "string") {
257 this._customHeaders
.push
(key
, value
);
258 } else if (key
instanceof Array) {
259 for (var i
= 0; i
+ 1 < key
.length
; i
+= 2) {
260 this.addRequestHeader
(key
[i
], key
[i
+ 1]);
265 ASSetPropFlags
(LoadVars
.prototype
, null, 131);
269 Sound = ASconstructor
(500, 17);
270 ASSetNative
(Sound.prototype
, 500, "getPan,getTransform,getVolume,setPan,setTransform,setVolume,stop,attachSound,start,6getDuration,6setDuration,6getPosition,6setPosition,6loadSound,6getBytesLoaded,6getBytesTotal,9areSoundsInaccessible");
271 ASSetNativeAccessor
(Sound.prototype
, 500, "checkPolicyFile", 18);
272 ASSetPropFlags
(Sound.prototype
, null, 7);
278 System.capabilities
= {};
279 System.capabilities
.Query
= ASnative
(11, 0);
280 System.capabilities
.Query
();
281 delete System.capabilities
.Query
;
283 System.setClipboard
= ASnative
(1066, 0);
284 System.showSettings
= ASnative
(2107, 0);
285 ASSetNativeAccessor
(System, 2107, "exactSettings,useCodepage", 1);
286 ASSetPropFlags
(System, "exactSettings,useCodePage", 128);
288 /*** System.security */
290 System.security
= new Object();
291 delete System.security
.constructor
;
292 ASSetNative
(System.security
, 12, "allowDomain,7allowInsecureDomain,loadPolicyFile,chooseLocalSwfPath,escapeDomain");
293 ASSetNativeAccessor
(System.security
, 12, "sandboxType", 5);
295 /*** System.security.PolicyFileResolver */
297 System.security
.PolicyFileResolver
= function () {
298 var o
= {}; o
["Implement System.security.PolicyFileResolver"] ();
300 System.security
.PolicyFileResolver
.prototype
.resolve
= ASnative
(15, 0);
301 AsBroadcaster
.initialize
(System.security
.PolicyFileResolver
.prototype
);
303 /*** System.Product ***/
305 System.Product
= function () {
306 var o
= {}; o
["Implement System.Product"] ();
309 System.Product
.prototype
.isRunning
= function () {
310 var o
= {}; o
["Implement System.Product.isRunning"] ();
313 System.Product
.prototype
.isInstalled
= function () {
314 var o
= {}; o
["Implement System.Product.isInstalled"] ();
317 System.Product
.prototype
.launch
= function () {
318 var o
= {}; o
["Implement System.Product.launch"] ();
321 System.Product
.prototype
.download
= function () {
322 var o
= {}; o
["Implement System.Product.download"] ();
325 System.Product
.prototype
.installedVersion
= function () {
326 var o
= {}; o
["Implement System.Product.installedVersion"] ();
329 System.Product
.prototype
.validate
= function () {
330 var o
= {}; o
["Implement System.Product.validate"] ();
333 ASSetPropFlags
(System.Product
.prototype
, null, 3);
338 ALPHANUMERIC_FULL
: "ALPHANUMERIC_FULL",
339 ALPHANUMERIC_HALF
: "ALPHANUMERIC_HALF",
341 JAPANESE_HIRAGANA
: "JAPANESE_HIRAGANA",
342 JAPANESE_KATAKANA_FULL
: "JAPANESE_KATAKANA_FULL",
343 JAPANESE_KATAKANA_HALF
: "JAPANESE_KATAKANA_HALF",
348 AsBroadcaster
.initialize
(System.IME);
350 ASSetNative
(System.IME, 13, "8getEnabled,8setEnabled,8getConversionMode,8setConversionMode,8setCompositionString,8doConversion");
351 ASSetPropFlags
(System.IME, null, 7);
355 Color = function (target
) {
356 this.target
= target
;
357 ASSetPropFlags
(this, null, 7);
359 ASSetNative
(Color.prototype
, 700, "setRGB,setTransform,getRGB,getTransform");
360 ASSetPropFlags
(Color.prototype
, null, 7);
364 TextSnapshot = ASconstructor
(1067, 0);
365 ASSetNative
(TextSnapshot.prototype
, 1067, "6getCount,6setSelected,6getSelected,6getText,6getSelectedText,6hitTestTextNearPos,6findText,6setSelectColor,6getTextRunInfo", 1);
369 MovieClip = function () {};
370 MovieClip.prototype
.useHandCursor
= true;
371 MovieClip.prototype
.enabled
= true;
373 MovieClip.prototype
.meth
= function (method
) {
374 var lower
= method
.toLowerCase
();
375 if (lower
== "post") {
377 } else if (lower
== "get") {
384 MovieClip.prototype
.getURL
= function (url
, target
, method
) {
385 if (typeof (target
) == "undefined")
386 target
= ""; // undefined to empty string, even in version >= 7
388 var type
= this.meth
(method
);
390 getURL
(url
, target
);
391 } else if (type
== 1) {
392 getURL
(url
, target
, "GET");
394 getURL
(url
, target
, "POST");
398 // work around ming bug, causing loadVariables to be lower cased
399 MovieClip.prototype
["loadVariables"] = function (url
, method
) {
400 var type
= this.meth
(method
);
403 loadVariables
(url
, this._target
);
404 } else if (type
== 1) {
405 loadVariables
(url
, this._target
, "GET");
407 loadVariables
(url
, this._target
, "POST");
412 // work around ming bug, causing loadMovie to be lower cased
413 MovieClip.prototype
["loadMovie"] = function (url
, method
) {
414 var type
= this.meth
(method
);
417 loadMovie
(url
, this._target
);
418 } else if (type
== 1) {
419 loadMovie
(url
, this._target
, "GET");
421 loadMovie
(url
, this._target
, "POST");
426 MovieClip.prototype
.unloadMovie
= function () {
428 loadMovie
("", this._target
);
432 MovieClip.prototype
.getTextSnapshot
= function () {
433 return new TextSnapshot(this);
435 ASSetPropFlags
(MovieClip.prototype
, "getTextSnapshot", 128);
438 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");
439 ASSetNativeAccessor
(MovieClip.prototype
, 900, "tabIndex", 200);
440 ASSetNativeAccessor
(MovieClip.prototype
, 900, "_lockroot", 300);
441 ASSetNativeAccessor
(MovieClip.prototype
, 900, "8cacheAsBitmap,8opaqueBackground,8scrollRect", 401);
442 ASSetNativeAccessor
(MovieClip.prototype
, 900, "8filters,8transform", 417);
443 ASSetNativeAccessor
(MovieClip.prototype
, 900, "8blendMode", 500);
445 ASSetNative
(MovieClip.prototype
, 901, "6createEmptyMovieClip,6beginFill,6beginGradientFill,6moveTo,6lineTo,6curveTo,6lineStyle,6endFill,6clear,8lineGradientStyle,8beginMeshFill,8beginBitmapFill");
446 ASSetNativeAccessor
(MovieClip.prototype
, 901, "8scale9Grid", 12);
448 MovieClip.prototype
.createTextField
= ASnative
(104, 200);
450 ASSetPropFlags
(MovieClip.prototype
, null, 3);
452 /* MovieClipLoader */
454 MovieClipLoader
= ASconstructor
(112, 0);
455 ASSetNative
(MovieClipLoader
.prototype
, 112, "7loadClip,7getProgress,7unloadClip", 100);
456 AsBroadcaster
.initialize
(MovieClipLoader
.prototype
);
457 ASSetPropFlags
(MovieClipLoader
.prototype
, null, 1027);
461 TextField = ASconstructor
(104, 0);
462 TextField.getFontList
= ASnative
(104, 201);
464 ASSetNative
(TextField.prototype
, 104, "6replaceSel,6getTextFormat,6setTextFormat,6removeTextField,6getNewTextFormat,6setNewTextFormat,6getDepth,7replaceText", 100);
465 AsBroadcaster
.initialize
(TextField.prototype
);
467 ASSetPropFlags
(TextField.prototype
, null, 131);
469 ASSetNativeAccessor
(TextField.prototype
, 104, "8gridFitType,8antiAliasType,8thickness,8sharpness,8filters", 300);
470 // FIXME: this should be done inside the TextField constructor
471 ASSetNativeAccessor
(TextField.prototype
, 900, "8tabIndex", 200);
473 ASSetPropFlags
(TextField, null, 131);
477 TextFormat = ASconstructor
(110, 0);
479 /* TextField.Stylesheet */
481 TextField.StyleSheet = ASconstructor
(113, 0);
483 TextField.StyleSheet.prototype
._copy
= function (o
) {
484 if (typeof (o
) != "object")
488 for (var prop
in o
) {
489 o_new
[prop
] = o
[prop
];
494 TextField.StyleSheet.prototype
.clear
= function () {
500 TextField.StyleSheet.prototype
.getStyle
= function (name
) {
501 return (this._copy
(this._css
[name
]));
504 TextField.StyleSheet.prototype
.setStyle
= function (name
, style
) {
508 this._css
[name
] = this._copy
(style
);
509 this.doTransform
(name
);
513 TextField.StyleSheet.prototype
.getStyleNames
= function () {
514 var tmp
= this._css
; /* ming bug? */
516 for (var prop
in tmp
) {
522 TextField.StyleSheet.prototype
.doTransform
= function (name
) {
526 this._styles
[name
] = this.transform
(this._css
[name
]);
529 TextField.StyleSheet.prototype
.transform
= function (style
) {
533 var format
= new TextFormat ();
536 format
.align
= style
.textAlign
;
538 if (style
.fontWeight
== "bold") {
540 } else if (style
.fontWeight
== "normal") {
545 var tmp
= this.parseColor
(style
.color
);
550 format
.display
= style
.display
;
552 if (style
.fontFamily
)
553 format
.font
= this.parseCSSFontFamily
(style
.fontFamily
);
555 if (style
.textIndent
)
556 format
.indent
= parseInt
(style
.textIndent
);
558 if (style
.fontStyle
== "italic") {
559 format
.italic
= true;
560 } else if (style
.fontStyle
== "normal") {
561 format
.italic
= false;
564 if (style
.kerning
== "true") {
565 format
.kerning
= true;
566 } else if (style
.kerning
== "false") {
567 format
.kerning
= false;
569 format
.kerning
= parseInt
(style
.kerning
);
573 format
.leading
= parseInt
(style
.leading
);
575 if (style
.marginLeft
)
576 format
.leftMargin
= parseInt
(style
.marginLeft
);
578 if (style
.letterSpacing
)
579 format
.letterSpacing
= parseInt
(style
.letterSpacing
);
581 if (style
.marginRight
)
582 format
.rightMargin
= parseInt
(style
.marginRight
);
584 if (style
.fontSize
) {
585 var tmp
= parseInt
(style
.fontSize
);
590 if (style
.textDecoration
== "underline") {
591 format
.underline
= true;
592 } else if (style
.textDecoration
== "none") {
593 format
.underline
= false;
599 TextField.StyleSheet.prototype
.parseCSS
= function (css
) {
600 var result
= this.parseCSSInternal
(css
);
601 if (typeof (result
) == "null")
607 for (var prop
in result
) {
608 this._css
[prop
] = this._copy
(result
[prop
]);
609 this.doTransform
(prop
);
616 TextField.StyleSheet.prototype
.parse
= TextField.StyleSheet.prototype
.parseCSS
;
618 TextField.StyleSheet.prototype
.load
= ASnative
(301, 0);
620 TextField.StyleSheet.prototype
.onLoad
= function () {
623 TextField.StyleSheet.prototype
.onData
= function (src
) {
625 var result
= this.parse
(src
);
626 this.loaded
= result
;
627 this.onLoad
(result
);
633 ASSetNative
(TextField.StyleSheet.prototype
, 113, "7update,7parseCSSInternal,7parseCSSFontFamily,7parseColor", 100);
634 ASSetPropFlags
(TextField.StyleSheet.prototype
, null, 1027);
635 ASSetPropFlags
(TextField, "StyleSheet", 1027);
639 Video = function () {};
640 ASSetNative
(Video.prototype
, 667, "6attachVideo,6clear", 1);
641 ASSetPropFlags
(Video.prototype
, null, 3);
646 ASSetNative
(Accessibility, 1999, "6isActive,6sendEvent,6updateProperties");
647 ASSetPropFlags
(Accessibility, null, 6);
651 Camera = function () {};
653 Camera.get = function (index
) {
654 var get_func
= ASnative
(2102, 200);
655 return get_func
(index
);
657 Camera.addProperty
("names", ASnative
(2102, 201), null);
658 ASSetNative
(Camera.prototype
, 2102, "6setMode,6setQuality,6setKeyFrameInterval,6setMotionLevel,6setLoopback,6setCursor");
659 ASSetPropFlags
(Camera.prototype
, null, 3);
663 ContextMenu = function (callback
) {
664 this.onSelect
= callback
;
665 this.customItems
= new Array ();
666 this.builtInItems
= {
678 ContextMenu.prototype
.copy
= function () {
679 var o
= new ContextMenu ();
681 o
.onSelect
= this.onSelect
;
683 o
.customItems
= new Array ();
684 for (var i
= 0; i
< this.customItems
.length
; i
++) {
685 o
.customItems
.push
(this.customItems
[i
].copy
());
688 o
.builtInItems
= this.builtInItems
;
693 ContextMenu.prototype
.hideBuiltInItems
= function () {
694 this.builtInItems
= {
706 ASSetPropFlags
(ContextMenu.prototype
, null, 1027);
708 /* ContextMenuItem */
710 ContextMenuItem = function (caption
, callback
, separatorBefore
, enabled
, visible
)
712 this.caption
= caption
;
713 this.onSelect
= callback
;
714 if (separatorBefore
== undefined) {
715 this.separatorBefore
= false;
717 this.separatorBefore
= separatorBefore
;
719 if (enabled
== undefined) {
722 this.enabled
= enabled
;
724 if (visible
== undefined) {
727 this.visible
= visible
;
731 ContextMenuItem.prototype
.copy
= function () {
732 var o
= new ContextMenuItem ();
734 o
.caption
= this.caption
;
735 o
.onSelect
= this.onSelect
;
736 o
.separatorBefore
= this.separatorBefore
;
737 o
.enabled
= this.enabled
;
738 o
.visible
= this.visible
;
743 ASSetPropFlags
(ContextMenuItem.prototype
, null, 1027);
748 flash
.net
.FileReference = function () {
749 var c
= ASnative
(2204, 200);
751 this._listeners
= [];
754 AsBroadcaster
.initialize
(flash
.net
.FileReference.prototype
);
755 ASSetNative
(flash
.net
.FileReference.prototype
, 2204, "8browse,8upload,8download,8cancel");
756 ASSetPropFlags
(flash
.net
.FileReference.prototype
, null, 3);
758 /* FileReferenceList */
760 flash
.net
.FileReferenceList = function () {
761 this.fileList
= new Array();
762 this._listeners
= [];
765 AsBroadcaster
.initialize
(flash
.net
.FileReferenceList.prototype
);
766 ASSetNative
(flash
.net
.FileReferenceList.prototype
, 2205, "8browse");
767 ASSetPropFlags
(flash
.net
.FileReferenceList.prototype
, null, 3);
769 /* LocalConnection */
771 LocalConnection = function () {};
773 ASSetNative
(LocalConnection.prototype
, 2200, "6connect,6send,6close,6domain");
774 ASSetPropFlags
(LocalConnection.prototype
, null, 3);
778 Microphone = function () {};
780 Microphone.get = function (index
) {
781 var get_func
= ASnative
(2104, 200);
782 return get_func
(index
);
784 Microphone.addProperty
("names", ASnative
(2104, 201), null);
785 ASSetNative
(Microphone.prototype
, 2104, "6setSilenceLevel,6setRate,6setGain,6setUseEchoSuppression");
786 ASSetPropFlags
(Microphone.prototype
, null, 3);
790 PrintJob = ASconstructor
(111, 0);
791 ASSetNative
(PrintJob.prototype
, 111, "7start,7addPage,7send", 100);
792 ASSetPropFlags
(PrintJob.prototype
, null, 1027);
797 ASSetNative
(Selection
, 600, "getBeginIndex,getEndIndex,getCaretIndex,getFocus,setFocus,setSelection");
798 AsBroadcaster
.initialize
(Selection
);
799 ASSetPropFlags
(Selection
, null, 7);
804 flash
.text
.TextRenderer = ASconstructor
(2150, 0);
806 ASSetNative
(flash
.text
.TextRenderer, 2150, "8setAdvancedAntialiasingTable", 1);
807 ASSetNativeAccessor
(flash
.text
.TextRenderer, 2150, "8maxLevel", 4);
808 ASSetNativeAccessor
(flash
.text
.TextRenderer, 2150, "8displayMode", 10);
810 textRenderer
= flash
.text
.TextRenderer; // awesome
814 XMLSocket = function () {};
816 XMLSocket.prototype
.onData
= function (src
) {
817 this.onXML
(new XML (src
));
820 ASSetNative
(XMLSocket.prototype
, 400, "connect,send,close");
821 ASSetPropFlags
(XMLSocket.prototype
, null, 3);
827 flash
.geom
.Point = function () {
828 if (arguments.length
== 0) {
832 // Note: we don't check for length == 1
833 this.x
= arguments[0];
834 this.y
= arguments[1];
838 flash
.geom
.Point.distance
= function (a
, b
) {
839 return a
.subtract
(b
).length
;
842 flash
.geom
.Point.interpolate
= function (a
, b
, value
) {
843 return new flash
.geom
.Point (b
.x
+ value
* (a
.x
- b
.x
),
844 b
.y
+ value
* (a
.y
- b
.y
));
847 flash
.geom
.Point.polar
= function (length
, angle
) {
848 return new flash
.geom
.Point (length
* Math.cos
(angle
),
849 length
* Math.sin
(angle
));
852 flash
.geom
.Point.prototype
.addProperty
("length",
853 function () { return Math.sqrt
(this.x
* this.x
+ this.y
* this.y
); },
856 flash
.geom
.Point.prototype
.add
= function (other
) {
857 return new flash
.geom
.Point (this.x
+ other
.x
, this.y
+ other
.y
);
860 flash
.geom
.Point.prototype
.clone
= function () {
861 return new flash
.geom
.Point (this.x
, this.y
);
864 flash
.geom
.Point.prototype
.equals
= function (other
) {
865 if (!other instanceOf flash
.geom
.Point)
868 return (other
.x
== this.x
&& other
.y
== this.y
);
871 flash
.geom
.Point.prototype
.normalize
= function (length
) {
872 if (this.length
<= 0)
875 var factor
= length
/ this.length
;
876 this.x
= this.x
* factor
;
877 this.y
= this.y
* factor
;
880 flash
.geom
.Point.prototype
.subtract
= function (other
) {
881 return new flash
.geom
.Point (this.x
- other
.x
, this.y
- other
.y
);
884 flash
.geom
.Point.prototype
.offset
= function (x
, y
) {
889 flash
.geom
.Point.prototype
.toString
= function () {
890 return "(x=" + this.x
+ ", y=" + this.y
+ ")";
895 flash
.geom
.Rectangle = function (x
, y
, width
, height
) {
896 if (arguments.length
== 0) {
902 this.height
= height
;
906 flash
.geom
.Rectangle.prototype
.clone
= function () {
907 return new flash
.geom
.Rectangle (this.x
, this.y
, this.width
, this.height
);
910 flash
.geom
.Rectangle.prototype
.toString
= function () {
911 return "(x=" + this.x
+ ", y=" + this.y
+ ", w=" + this.width
+ ", h=" + this.height
+ ")";
914 flash
.geom
.Rectangle.prototype
.equals
= function (rect
) {
915 return (rect
instanceof flash
.geom
.Rectangle &&
916 this.x
== rect
.x
&& this.y
== rect
.y
&&
917 this.width
== rect
.width
&& this.height
== rect
.height
);
920 flash
.geom
.Rectangle.prototype
.contains
= function (x
, y
) {
921 return (this.x
<= x
&& this.y
<= y
&&
922 this.x
+ this.width
> x
&& this.y
+ this.height
> y
);
925 flash
.geom
.Rectangle.prototype
.containsPoint
= function (point
) {
926 return (this.x
<= point
.x
&& this.y
<= point
.y
&&
927 this.x
+ this.width
> point
.x
&& this.y
+ this.height
> point
.y
);
930 flash
.geom
.Rectangle.prototype
.containsRectangle
= function (rect
) {
931 var tr
= this.x
+ this.width
;
932 var tb
= this.y
+ this.height
;
933 var rr
= rect
.x
+ rect
.width
;
934 var rb
= rect
.y
+ rect
.height
;
935 return (rect
.x
>= this.x
&& rect
.x
< tr
&& rect
.y
>= this.y
&& rect
.y
< tb
&&
936 rr
> this.x
&& rr
<= tr
&& rb
> this.y
&& rb
<= tb
);
939 flash
.geom
.Rectangle.prototype
.isEmpty
= function () {
940 return (this.width
<= 0 || this.height
<= 0);
943 flash
.geom
.Rectangle.prototype
.setEmpty
= function () {
950 flash
.geom
.Rectangle.prototype
.intersection
= function (rect
) {
951 var ints
= new flash
.geom
.Rectangle ();
953 if (this.isEmpty
() || rect
.isEmpty
()) {
958 ints
.x
= Math.max
(this.x
, rect
.x
);
959 ints
.y
= Math.max
(this.y
, rect
.y
);
960 ints
.width
= Math.min
(this.x
+ this.width
, rect
.x
+ rect
.width
) - ints
.x
;
961 ints
.height
= Math.min
(this.y
+ this.height
, rect
.y
+ rect
.height
) - ints
.y
;
963 if (ints
.width
<= 0 || ints
.height
<= 0)
969 flash
.geom
.Rectangle.prototype
.intersects
= function (rect
) {
970 return !this.intersection
(rect
).isEmpty
();
973 flash
.geom
.Rectangle.prototype
.union
= function (rect
) {
975 return rect
.clone
();
978 return this.clone
();
980 var union
= new flash
.geom
.Rectangle ();
981 union
.x
= Math.min
(this.x
, rect
.x
);
982 union
.y
= Math.min
(this.y
, rect
.y
);
983 union
.width
= Math.max
(this.x
+ this.width
, rect
.x
+ rect
.width
) - union
.x
;
985 Math.max
(this.y
+ this.height
, rect
.y
+ rect
.height
) - union
.y
;
990 flash
.geom
.Rectangle.prototype
.offset
= function (dx
, dy
) {
995 flash
.geom
.Rectangle.prototype
.offsetPoint
= function (d
) {
1000 flash
.geom
.Rectangle.prototype
.inflate
= function (dx
, dy
) {
1002 this.width
+= 2 * dx
;
1005 this.height
+= 2 * dy
;
1008 flash
.geom
.Rectangle.prototype
.inflatePoint
= function (d
) {
1010 this.width
+= 2 * d
.x
;
1013 this.height
+= 2 * d
.y
;
1016 flash
.geom
.Rectangle.prototype
.addProperty
("left",
1021 this.width
+= this.x
- left
;
1026 flash
.geom
.Rectangle.prototype
.addProperty
("right",
1028 return this.x
+ this.width
;
1031 this.width
= right
- this.x
;
1035 flash
.geom
.Rectangle.prototype
.addProperty
("top",
1040 this.height
+= this.y
- top
;
1045 flash
.geom
.Rectangle.prototype
.addProperty
("bottom",
1047 return this.y
+ this.height
;
1050 this.height
= bottom
- this.y
;
1054 flash
.geom
.Rectangle.prototype
.addProperty
("topLeft",
1056 return new flash
.geom
.Point (this.x
, this.y
);
1058 function (topLeft
) {
1059 this.width
+= this.x
- topLeft
.x
;
1060 this.height
+= this.y
- topLeft
.y
;
1066 flash
.geom
.Rectangle.prototype
.addProperty
("bottomRight",
1068 return new flash
.geom
.Point (this.x
+ this.width
, this.y
+ this.height
);
1070 function (bottomRight
) {
1071 this.width
= bottomRight
.x
- this.x
;
1072 this.height
= bottomRight
.y
- this.y
;
1076 flash
.geom
.Rectangle.prototype
.addProperty
("size",
1078 return new flash
.geom
.Point (this.width
, this.height
);
1081 this.width
= size
.x
;
1082 this.height
= size
.y
;
1088 flash
.geom
.Matrix = function (pa
, pb
, pc
, pd
, ptx
, pty
) {
1089 if (!arguments.length
) {
1101 flash
.geom
.Matrix.prototype
.clone
= function () {
1102 return new flash
.geom
.Matrix (this.a
, this.b
, this.c
, this.d
, this.tx
,
1106 flash
.geom
.Matrix.prototype
.concat
= function (other
) {
1107 var a
= this.a
* other
.a
;
1108 var d
= this.d
* other
.d
;
1111 var tx
= this.tx
* other
.a
+ other
.tx
;
1112 var ty
= this.ty
* other
.d
+ other
.ty
;
1113 if (this.b
!= 0 || this.c
!= 0 || other
.b
!= 0 || other
.c
!= 0) {
1114 a
+= this.b
* other
.c
;
1115 d
+= this.c
* other
.b
;
1116 b
= this.a
* other
.b
+ this.b
* other
.d
;
1117 c
= this.c
* other
.a
+ this.d
* other
.c
;
1118 tx
+= this.ty
* other
.c
;
1119 ty
+= this.tx
* other
.b
;
1129 flash
.geom
.Matrix.prototype
.createBox
= function (scaleX
, scaleY
, rotation
, x
, y
) {
1131 this.rotate
(arguments.length
> 2 ? rotation
: 0);
1132 this.scale
(scaleX
, scaleY
);
1133 if (arguments.length
> 3)
1135 if (arguments.length
> 4)
1139 flash
.geom
.Matrix.prototype
.createGradientBox
= function (width
, height
, rotation
, x
, y
) {
1140 this.createBox
(width
/ 1638.4, height
/ 1638.4,
1141 arguments.length
> 2 ? rotation
: 0,
1142 (arguments.length
> 3 ? x
: 0) + width
/ 2,
1143 (arguments.length
> 4 ? y
: 0) + height
/ 2);
1146 flash
.geom
.Matrix.prototype
.deltaTransformPoint
= function (p
) {
1147 return new flash
.geom
.Point (this.a
* p
.x
+ this.c
* p
.y
, this.d
* p
.y
+ this.b
* p
.x
);
1150 flash
.geom
.Matrix.prototype
.identity
= function () {
1151 this.a
= this.d
= 1;
1152 this.b
= this.c
= this.tx
= this.ty
= 0;
1155 flash
.geom
.Matrix.prototype
.invert
= function () {
1156 if (this.b
== 0 && this.c
== 0) {
1157 this.a
= 1 / this.a
;
1158 this.d
= 1 / this.d
;
1159 this.b
= this.c
= 0;
1160 this.tx
= -this.a
* this.tx
;
1161 this.ty
= -this.d
* this.ty
;
1169 var det
= a
* d
- b
* c
;
1180 var p
= this.deltaTransformPoint
(new flash
.geom
.Point(this.tx
, this.ty
));
1185 flash
.geom
.Matrix.prototype
.rotate
= function (amount
) {
1186 var cos
= Math.cos
(amount
);
1187 var sin
= Math.sin
(amount
);
1188 this.concat
(new flash
.geom
.Matrix (cos
, sin
, -sin
, cos
, 0, 0));
1191 flash
.geom
.Matrix.prototype
.scale
= function (x
, y
) {
1192 this.concat
(new flash
.geom
.Matrix (x
, 0, 0, y
, 0, 0));
1195 flash
.geom
.Matrix.prototype
.transformPoint
= function (p
) {
1196 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
);
1199 flash
.geom
.Matrix.prototype
.translate
= function (dx
, dy
) {
1205 flash
.geom
.Matrix.prototype
.toString
= function () {
1206 return "(a=" + this.a
+ ", b=" + this.b
+ ", c=" + this.c
+ ", d=" + this.d
+
1207 ", tx=" + this.tx
+ ", ty=" + this.ty
+ ")";
1210 /* ColorTransform */
1212 flash
.geom
.ColorTransform = ASconstructor
(1105, 0);
1214 flash
.geom
.ColorTransform.prototype
.toString
= function () {
1215 return "(redMultiplier=" + this.redMultiplier
+
1216 ", greenMultiplier=" + this.greenMultiplier
+
1217 ", blueMultiplier=" + this.blueMultiplier
+
1218 ", alphaMultiplier=" + this.alphaMultiplier
+
1219 ", redOffset=" + this.redOffset
+
1220 ", greenOffset=" + this.greenOffset
+
1221 ", blueOffset=" + this.blueOffset
+
1222 ", alphaOffset=" + this.alphaOffset
+ ")";
1225 ASSetNative
(flash
.geom
.ColorTransform.prototype
, 1105, "8concat", 1);
1226 ASSetNativeAccessor
(flash
.geom
.ColorTransform.prototype
, 1105, "8alphaMultiplier,8redMultiplier,8greenMultiplier,8blueMultiplier,8alphaOffset,8redOffset,8greenOffset,8blueOffset,8rgb", 101);
1230 flash
.geom
.Transform = ASconstructor
(1106, 0);
1232 ASSetNativeAccessor
(flash
.geom
.Transform.prototype
, 1106, "8matrix,8concatenatedMatrix,8colorTransform,8concatenatedColorTransform,8pixelBounds", 101);
1237 flash
.display
.BitmapData = ASconstructor
(1100, 0);
1239 flash
.display
.BitmapData.RED_CHANNEL
= 1;
1240 flash
.display
.BitmapData.GREEN_CHANNEL
= 2;
1241 flash
.display
.BitmapData.BLUE_CHANNEL
= 4;
1242 flash
.display
.BitmapData.ALPHA_CHANNEL
= 8;
1244 ASSetNative
(flash
.display
.BitmapData, 1100, "8loadBitmap", 40);
1246 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);
1247 ASSetNativeAccessor
(flash
.display
.BitmapData.prototype
, 1100, "8width,8height,8rectangle,8transparent", 100);
1249 /* ExternalInterface */
1251 flash
.external
= {};
1253 flash
.external
.ExternalInterface = function () {
1256 flash
.external
.ExternalInterface.addCallback
= function (name
, instance
, method
) {
1257 if (!method
|| !flash
.external
.ExternalInterface.available
)
1260 flash
.external
.ExternalInterface._initJS
();
1261 return flash
.external
.ExternalInterface._addCallback
(name
, function (request
) {
1262 return flash
.external
.ExternalInterface._callIn
(instance
, method
, request
);
1266 flash
.external
.ExternalInterface.call
= function (name
) {
1267 if (!flash
.external
.ExternalInterface.available
)
1270 flash
.external
.ExternalInterface._initJS
();
1271 var request
= "try { ";
1272 var id
= flash
.external
.ExternalInterface._objectID
();
1274 request
+= id
+ ".SetReturnValue(";
1275 request
+= "__flash__toXML (" + name
+ "(";
1276 for (var i
= 1; i
< arguments.length
; i
++) {
1279 request
+= flash
.external
.ExternalInterface._toJS
(arguments[i
]);
1284 request
+= "; } catch (e) { ";
1286 request
+= id
+ ".SetReturnValue(\"<undefined/>\"); }";
1288 request
+= "\"<undefined/>\"; }";
1290 var result
= flash
.external
.ExternalInterface._evalJS
(request
);
1291 if (result
== null) {
1292 request
= "<invoke name=\"" + name
+ "\" returntype=\"xml\">" + flash
.external
.ExternalInterface._argumentsToXML
(arguments) + "</invoke>";
1293 result
= flash
.external
.ExternalInterface._callOut
(request
);
1298 var xml
= new XML ();
1299 xml
.ignoreWhite
= true;
1300 xml
.parseXML
(result
);
1301 return flash
.external
.ExternalInterface._toAS
(xml
.firstChild
);
1304 flash
.external
.ExternalInterface._callIn
= function (instance
, method
, request
) {
1305 var xml
= new XML();
1306 xml
.ignoreWhite
= true;
1307 xml
.parseXML
(request
);
1309 for (var i
= 0; i
< xml
.firstChild
.childNodes
.length
; i
++) {
1310 if (xml
.firstChild
.childNodes
[i
].nodeName
== "arguments") {
1311 args
= xml
.firstChild
.childNodes
[i
];
1315 var result
= method
.apply
(instance
, flash
.external
.ExternalInterface._argumentsToAS
(args
));
1316 if (xml
.firstChild
.attributes
.returntype
== "javascript")
1317 return flash
.external
.ExternalInterface._toJS
(result
);
1319 return flash
.external
.ExternalInterface._toXML
(result
);
1322 flash
.external
.ExternalInterface._arrayToXML
= function (array
) {
1324 for (var i
= 0; i
< array
.length
; i
++) {
1325 s
+= "<property id=\"" + i
+ "\">" + flash
.external
.ExternalInterface._toXML
(array
[i
]) + "</property>";
1327 return s
+ "</array>";
1330 flash
.external
.ExternalInterface._argumentsToXML
= function (args
) {
1331 var s
= "<arguments>";
1332 for (var i
= 0; i
< args
.length
; i
++) {
1333 s
+= flash
.external
.ExternalInterface._toXML
(args
[i
]);
1335 return s
+ "</arguments>";
1338 flash
.external
.ExternalInterface._objectToXML
= function (obj
) {
1340 for (var prop
in obj
) {
1341 s
+= "<property id=\"" + prop
+ "\">" + flash
.external
.ExternalInterface._toXML
(obj
[prop
]) + "</property>";
1343 return s
+ "</object>";
1346 flash
.external
.ExternalInterface._toXML
= function (value
) {
1347 var type
= typeof(value
);
1348 if (type
== "string") {
1349 return "<string>" + flash
.external
.ExternalInterface._escapeXML
(value
) + "</string>";
1350 } else if (type
== "undefined") {
1351 return "<undefined/>";
1352 } else if (type
== "number") {
1353 return "<number>" + value
+ "</number>";
1354 } else if (value
== null) {
1356 } else if (type
== "boolean") {
1357 return value
? "<true/>" : "<false/>";
1358 } else if (value
.hasOwnProperty
("length")) {
1359 return flash
.external
.ExternalInterface._arrayToXML
(value
);
1360 } else if (type
== "object") {
1361 return flash
.external
.ExternalInterface._objectToXML
(value
);
1367 flash
.external
.ExternalInterface._objectToAS
= function (xml
) {
1369 for (i
= 0; i
< xml
.childNodes
.length
; i
++) {
1370 if (xml
.childNodes
[i
].nodeName
== "property")
1371 o
[xml
.childNodes
[i
].attributes
.id
] = flash
.external
.ExternalInterface._toAS
(xml
.childNodes
[i
].firstChild
);
1376 flash
.external
.ExternalInterface._arrayToAS
= function (xml
) {
1378 for (i
= 0; i
< xml
.childNodes
.length
; i
++) {
1379 if (xml
.childNodes
[i
].nodeName
== "property")
1380 a
[xml
.childNodes
[i
].attributes
.id
] = flash
.external
.ExternalInterface._toAS
(xml
.childNodes
[i
].firstChild
);
1385 flash
.external
.ExternalInterface._toAS
= function (xml
) {
1386 var type
= xml
.nodeName
;
1387 if (type
== "number") {
1388 return Number (xml
.firstChild
.toString
());
1389 } else if (type
== "string") {
1390 return flash
.external
.ExternalInterface._unescapeXML
(String (xml
.firstChild
));
1391 } else if (type
== "false") {
1393 } else if (type
== "true") {
1395 } else if (type
== "null") {
1397 } else if (type
== "undefined") {
1399 } else if (type
== "object") {
1400 return flash
.external
.ExternalInterface._objectToAS
(xml
);
1401 } else if (type
== "array") {
1402 return flash
.external
.ExternalInterface._arrayToAS
(xml
);
1403 } else if (type
== "class") {
1404 return String (xml
.firstChild
);
1410 flash
.external
.ExternalInterface._argumentsToAS
= function (xml
) {
1412 for (var i
= 0; i
< xml
.childNodes
.length
; i
++) {
1413 args
.push
(flash
.external
.ExternalInterface._toAS
(xml
.childNodes
[i
]));
1418 flash
.external
.ExternalInterface._arrayToJS
= function (array
) {
1420 for (var i
= 0; i
< array
.length
; i
++) {
1423 s
+= flash
.external
.ExternalInterface._toJS
(array
[_l1
]);
1428 flash
.external
.ExternalInterface._objectToJS
= function (obj
) {
1430 var needs_comma
= false;
1431 for (var prop
in obj
) {
1436 s
+= prop
+ ":" + flash
.external
.ExternalInterface._toJS
(obj
[prop
]);
1441 flash
.external
.ExternalInterface._toJS
= function (value
) {
1442 var type
= typeof (value
);
1443 if (type
== "string") {
1444 return "\"" + flash
.external
.ExternalInterface._jsQuoteString
(flash
.external
.ExternalInterface._unescapeXML
(value
)) + "\"";
1445 } else if (type
== "object") {
1446 if (value
instanceof Array) {
1447 return flash
.external
.ExternalInterface._arrayToJS
(value
);
1449 return flash
.external
.ExternalInterface._objectToJS
(value
);
1452 return String (value
);
1456 ASSetNative
(flash
.external
.ExternalInterface, 14, "8_initJS,8_objectID,8_addCallback,8_evalJS,8_callOut,8_escapeXML,8_unescapeXML,8_jsQuoteString");
1457 ASSetNativeAccessor
(flash
.external
.ExternalInterface, 14, "8available", 100);
1459 ASSetPropFlags
(flash
.external
.ExternalInterface, null, 4103);
1463 SharedObject = function () {
1466 SharedObject.deleteAll
= function () {
1467 var o
= {}; o
["Implement SharedObject.deleteAll (static)"] ();
1470 SharedObject.getDiskUsage
= function () {
1471 var o
= {}; o
["Implement SharedObject.getDiskUsage (static)"] ();
1474 SharedObject.getLocal
= function () {
1475 var o
= {}; o
["Implement SharedObject.getLocal (static)"] ();
1478 SharedObject.getRemote
= function () {
1479 var o
= {}; o
["Implement SharedObject.getRemote (static)"] ();
1482 ASSetPropFlags
(SharedObject, "deleteAll,getDiskUsage", 1);
1484 ASSetNative
(SharedObject.prototype
, 2106, "6connect,6send,6flush,6close,6getSize,6setFps,6clear");
1485 ASSetPropFlags
(SharedObject.prototype
, null, 3);
1489 /* This function added new Error classes in Flash player 7, in Flash player 9
1490 * it seems to be just broken, we just call new Error based on the number of
1491 * ,-characters in the given string */
1492 AsSetupError
= function (names
) {
1493 var count
= names
.split
(",").length
;
1494 for (var i
= 0; i
< count
; i
++) {
1495 var tmp
= new Error ();
1499 /* RemoteLSOUsage */
1501 RemoteLSOUsage
= function () {};
1503 RemoteLSOUsage
.getURLPageSupport
= function () {
1504 var o
= {}; o
["Implement RemoteLSOUsage.getURLPageSupport (static)"] ();
1506 ASSetPropFlags
(RemoteLSOUsage
, "getURLPageSupport", 1);
1510 Button = ASconstructor
(105, 0);
1512 Button.prototype
.useHandCursor
= true;
1513 Button.prototype
.enabled
= true;
1515 Button.prototype
.getDepth
= ASnative
(105, 3);
1516 ASSetNativeAccessor
(Button.prototype
, 105, "8scale9Grid,8filters,8cacheAsBitmap,8blendMode", 4);
1517 // FIXME: this should be done inside the Button constructor
1518 ASSetNativeAccessor
(Button.prototype
, 900, "8tabIndex", 200);
1524 flash
.filters
.BitmapFilter = ASconstructor
(1112, 0);
1526 ASSetNative
(flash
.filters
.BitmapFilter.prototype
, 1112, "8clone", 1);
1530 flash
.filters
.BevelFilter = ASconstructor
(1107, 0);
1531 flash
.filters
.BevelFilter.prototype
= new flash
.filters
.BitmapFilter ();
1532 delete flash
.filters
.BevelFilter.prototype
.constructor
;
1534 ASSetNativeAccessor
(flash
.filters
.BevelFilter.prototype
, 1107, "8distance,8angle,8highlightColor,8highlightAlpha,8shadowColor,8shadowAlpha,8quality,8strength,8knockout,8blurX,8blurY,8type", 1);
1538 flash
.filters
.BlurFilter = ASconstructor
(1102, 0);
1539 flash
.filters
.BlurFilter.prototype
= new flash
.filters
.BitmapFilter ();
1540 delete flash
.filters
.BlurFilter.prototype
.constructor
;
1542 ASSetNativeAccessor
(flash
.filters
.BlurFilter.prototype
, 1102, "8blurX,8blurY,8quality", 1);
1544 /* ColorMatrixFilter */
1546 flash
.filters
.ColorMatrixFilter = ASconstructor
(1110, 0);
1547 flash
.filters
.ColorMatrixFilter.prototype
= new flash
.filters
.BitmapFilter ();
1548 delete flash
.filters
.ColorMatrixFilter.prototype
.constructor
;
1550 ASSetNativeAccessor
(flash
.filters
.ColorMatrixFilter.prototype
, 1110, "8matrix", 1);
1552 /* ConvolutionFilter */
1554 flash
.filters
.ConvolutionFilter = ASconstructor
(1109, 0);
1555 flash
.filters
.ConvolutionFilter.prototype
= new flash
.filters
.BitmapFilter ();
1556 delete flash
.filters
.ConvolutionFilter.prototype
.constructor
;
1558 ASSetNativeAccessor
(flash
.filters
.ConvolutionFilter.prototype
, 1109, "8matrixX,8matrixY,8matrix,8divisor,8bias,8preserveAlpha,8clamp,8color,8alpha", 1);
1560 /* DisplacementMapFilter */
1562 flash
.filters
.DisplacementMapFilter = ASconstructor
(1111, 0);
1563 flash
.filters
.DisplacementMapFilter.prototype
= new flash
.filters
.BitmapFilter ();
1564 delete flash
.filters
.DisplacementMapFilter.prototype
.constructor
;
1566 ASSetNativeAccessor
(flash
.filters
.DisplacementMapFilter.prototype
, 1111, "8mapBitmap,8mapPoint,8componentX,8componentY,8scaleX,8scaleY,8mode,8color,8alpha", 1);
1568 /* DropShadowFilter */
1570 flash
.filters
.DropShadowFilter = ASconstructor
(1101, 0);
1571 flash
.filters
.DropShadowFilter.prototype
= new flash
.filters
.BitmapFilter();
1572 delete flash
.filters
.DropShadowFilter.prototype
.constructor
;
1574 ASSetNativeAccessor
(flash
.filters
.DropShadowFilter.prototype
, 1101, "8distance,8angle,8color,8alpha,8quality,8inner,8knockout,8blurX,8blurY,8strength,8hideObject", 1);
1578 flash
.filters
.GlowFilter = ASconstructor
(1103, 0);
1579 flash
.filters
.GlowFilter.prototype
= new flash
.filters
.BitmapFilter ();
1580 delete flash
.filters
.GlowFilter.prototype
.constructor
;
1582 ASSetNativeAccessor
(flash
.filters
.GlowFilter.prototype
, 1103, "8color,8alpha,8quality,8inner,8knockout,8blurX,8blurY,8strength", 1);
1584 /* GradientBevelFilter */
1586 flash
.filters
.GradientBevelFilter = ASconstructor
(1108, 1000);
1587 flash
.filters
.GradientBevelFilter.prototype
= new flash
.filters
.BitmapFilter ();
1588 delete flash
.filters
.GradientBevelFilter.prototype
.constructor
;
1590 ASSetNativeAccessor
(flash
.filters
.GradientBevelFilter.prototype
, 1108, "8distance,8angle,8colors,8alphas,8ratios,8blurX,8blurY,8quality,8strength,8knockout,8type", 1);
1592 /* GradientGlowFilter */
1594 flash
.filters
.GradientGlowFilter = ASconstructor
(1108, 0);
1595 flash
.filters
.GradientGlowFilter.prototype
= o
= new flash
.filters
.BitmapFilter ();
1596 delete flash
.filters
.GradientGlowFilter.prototype
.constructor
;
1597 ASSetNativeAccessor
(flash
.filters
.GradientGlowFilter.prototype
, 1108, "8distance,8angle,8colors,8alphas,8ratios,8blurX,8blurY,8quality,8strength,8knockout,8type", 1);
1599 /* Global Functions */
1601 setInterval
= ASnative
(250, 0);
1602 clearInterval
= ASnative
(250, 1);
1603 setTimeout
= ASnative
(250, 2);
1604 clearTimeout
= clearInterval
;
1605 showRedrawRegions
= ASnative
(1021, 1);
1606 trace
= ASnative
(100, 4);
1607 updateAfterEvent
= ASnative
(9, 0);
1609 /*** OH THE HUMANITY ***/
1613 /*** Set propflags that would have interfered with running this script */
1615 ASSetPropFlags
(this, "flash", 4096);
1616 ASSetPropFlags
(Object, "addProperty", 128);
1617 ASSetPropFlags
(AsBroadcaster
, null, 131);
1619 /*** GLOBAL PROPFLAGS */
1621 ASSetPropFlags
(this, null, 1, 6);