forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jsfl.d.ts
1440 lines (1162 loc) · 50.4 KB
/
jsfl.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Type definitions for JSFL
// Project: https://adobe.com
// Definitions by: soywiz <https://github.com/soywiz/>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
interface FlashPoint {
x: number;
y: number;
}
interface FlashPoint3D extends FlashPoint {
z: number;
}
interface FlashRectangle {
top: number;
right: number;
bottom: number;
left: number;
}
interface FlashMatrix {
a: number;
b: number;
c: number;
d: number;
tx: number;
ty: number;
}
interface FlashFilter {
angle: number;
blurX: number;
blurY: number;
brightness: number;
color: any;
contrast: number;
distance: number;
enabled: boolean;
hideObject: boolean;
highlightColor: any;
hue: number;
inner: boolean;
knockout: boolean;
name: string;
quality: string;
saturation: number;
shadowColor: any;
strength: number;
type: string;
}
interface FlashDocument {
// "integer", "integerArray", "double", "doubleArray", "string", and "byteArray"
addDataToDocument(name: string, type: string, data: any): void; // Stores specified data with a document.
addDataToSelection(name: string, type: string, data: any): void; // Stores specified data with the selected object(s).
addFilter(filterName: string): void; // Applies a filter to the selected objects.
addItem(position: FlashPoint, item: FlashItem): boolean; // Adds an item from any open document or library
addNewLine(startPoint: FlashPoint, endpoint: FlashPoint):void; // Adds a new path between two points.
addNewOval(boundingRectangle: FlashRectangle, bSuppressFill?: boolean, bSuppressStroke?: boolean): void; // Adds a new Oval object in the specified
addNewPrimitiveOval(boundingRectangle: FlashRectangle, bSpupressFill?: boolean, bSuppressStroke?: boolean): void;
addNewRectangle(boundingRectangle: FlashRectangle, roundness: number, bSuppressFill?: boolean, bSuppressStroke?: boolean); // Adds a new rectangle or rounded rectangle,
addNewPrimitiveRectangle(boundingRectangle: FlashRectangle, roundness: number, bSuppressFill?: boolean, bSuppressStroke?: boolean); // Adds a new rectangle or rounded rectangle,
addNewPublishProfile(profileName?: string): void;
addNewScene(name: string): boolean; // Adds a new scene (Timeline object) as the next
addNewText(boundingRectangle: FlashRectangle, text?: string): void; // Inserts a new empty text field.
align(alignmode: string, bUseDocumentBounds?: boolean); // Aligns the selection.
allowScreens(): void; // Use this method before using the
/** Arranges the selection on the Stage. "back", "backward", "forward", and "front" */
arrange(arrangeMode: string): void;
/** Performs a break-apart operation on the current */
breakApart(): void;
/** Indicates whether the Edit Symbols menu and */
canEditSymbol(): boolean;
/** Determines whether you can use the */
canRevert(): boolean;
///** Determines whether a version of the specified */
//canSaveAVersion(): boolean;
/** Determines whether you can use the */
canTestMovie(): boolean;
/** Determines whether you can use the */
canTestScene(): boolean;
/** Changes the index of the filter in the Filter list. */
changeFilterOrder(oldIndex: number, newIndex: number): void;
/** Copies the current selection from the document */
clipCopy(): void;
/** Cuts the current selection from the document */
clipCut(): void;
/** Pastes the contents of the Clipboard into the document. */
clipPaste(bInPlace?: boolean): void;
/** Closes the specified document. */
close(bPromptToSaveChanges?: boolean): void;
/** Converts lines to fills on the selected objects. */
convertLinesToFills(): void;
/** Converts the selected Stage item(s) to a new */
convertToSymbol(type: string, name: string, registrationPoint: string): FlashSymbolInstance;
/** Uses the top selected drawing object to crop all */
crop(): void;
/** Method; Invokes the Debug Movie command on the document. */
debugMovie(abortIfErrorsExist?: boolean): void;
/** Deletes the envelope (bounding box that */
deleteEnvelope(): boolean;
/** Deletes the currently active profile, if there is */
deletePublishProfile(): boolean;
/** Deletes the current scene (Timeline object), and */
deleteScene(): boolean;
/** Deletes the current selection on the Stage. */
deleteSelection(): void;
/** Disables all filters on the selected objects. */
disableAllFilters(): void;
/** Disables the specified filter in the Filters list. */
disableFilter(filterIndex: number): void;
/** Disables all filters except the one at the specified */
disableOtherFilters(enabledFilterIndex: number): void;
/** Distributes the selection. */
distribute(distributemode: string, bUseDocumentBounds?: boolean): void;
/** Performs a distribute-to-layers operation on the */
distributeToLayers(): void;
/** Checks the document for persistent data with the */
documentHasData(name: string): boolean;
/** Duplicates the currently active profile and gives */
duplicatePublishProfile(profileName?: string): number;
/** Makes a copy of the currently selected scene, */
duplicateScene(): boolean;
/** Duplicates the selection on the Stage. */
duplicateSelection(): void;
/** Makes the specified scene the currently selected */
editScene(index: number): void;
/** Enables all the filters on the Filters list for the */
enableAllFilters(): void;
/** Enables the specified filter for the selected */
enableFilter(filterIndex: number): void;
/** Switches the authoring tool into the editing mode */
enterEditMode(editMode?: string): void;
/** Exits from symbol-editing mode and returns */
exitEditMode(): void;
/** Exports the document as one or more PNG files. */
exportPNG(fileURI: string, bCurrentPNGSettings?: boolean, bCurrentFrame?: boolean): boolean;
/** Exports the currently active profile to an XML */
exportPublishProfile(fileURI: string): void;
/** returns a string that specifies, in XML format, the specified profile. If you don't pass a value for profileName, the current profile is exported. */
exportPublishProfileString(profileName?: string): string;
/** Exports the document in the Flash SWF format. */
exportSWF(fileURI: string, bCurrentSettings?: boolean): void;
/** Identical to retrieving the value of the To Stage */
getAlignToDocument(): boolean;
/** Returns a string that specifies the blending mode */
getBlendMode(): string;
/** Retrieves the fill object of the selected shape, or */
getCustomFill(objectToFill?: string): FlashFill;
/** Returns the stroke object of the selected shape, */
getCustomStroke(locationOfStroke?: string): FlashStroke;
/** Retrieves the value of the specified data. */
getDataFromDocument(name: string): any;
/** Gets the specified Element property for the */
getElementProperty(propertyName: string): any;
/** Gets a specified TextAttrs property of the*/
getElementTextAttr(attrName: string, startIndex?: number, endIndex?: number): FlashTextAttrs;
/** Returns an array that contains the list of filters*/
getFilters(): FlashFilter[];
/** Returns a string containing the XML metadata */
getMetadata(): string;
/** returns the mobile XML settings for the document. */
getMobileSettings(): string;
/** Returns a string that represents the targeted */
getPlayerVersion(): string;
/** Gets the bounding rectangle of the current */
getSelectionRect(): FlashRectangle;
/** Gets the currently selected text. */
getTextString(startIndex?: number, endIndex?: number): string;
/** Retrieves the current Timeline object in the */
getTimeline(): FlashTimeline;
/** gets the location of the transformation point of the current selection. You can use the transformation point for commutations such as rotate and skew. */
getTransformationPoint(): FlashPoint;
/** Converts the current selection to a group.*/
group(): void;
/** Imports a file into the document. */
importFile(fileURI: string, importToLibrary?: boolean): void;
/** Imports a profile from a file. */
importPublishProfile(fileURI: string): number;
/** imports an XML string that represents a publish profile and sets it as the current profile. To generate an XML string to import, use document.exportPublishProfileString() before using this method. */
importPublishProfileString(xmlString: string): number;
/** Imports a SWF file into the document.*/
importSWF(fileURI: string): void;
/** creates an intersection drawing object from all selected drawing objects. This method returns false if there are no drawing objects selected, or if any of the selected items are not drawing objects. */
intersect(): boolean;
/** loads a cue point XML file. The format and DTD of the XML file is the same as the one imported and exported by the Cue Points Property inspector. The return value is the same as the string serialized in the Cue Point property of the object containing the instance of an FLVPlayback Component. */
loadCuepointXML(uri: string): any[];
/** Makes the size of the selected objects the same. */
match(bWidth: boolean, bHeight: boolean, bUseDocumentBounds?: boolean): void;
/** Performs a mouse click from the Selection tool. */
mouseClick(position: FlashPoint, bToggleSel: boolean, bShiftSel: boolean): void;
/** Performs a double mouse click from the */
mouseDblClk(position: FlashPoint, bAltDown: boolean, bShiftDown: boolean, bShiftSelect: boolean): void;
/** If the selection contains at least one path with at */
moveSelectedBezierPointsBy(delta: FlashPoint): void;
/** Moves selected objects by a specified distance. */
moveSelectionBy(distanceToMove: FlashPoint): void;
/** Optimizes smoothing for the current selection, */
optimizeCurves(smoothing: number, bUseMultiplePasses: boolean): void;
/** Publishes the document according to the active */
publish(): void;
/** uses the top selected drawing object to punch through all selected drawing objects underneath it. This method returns false if there are no drawing objects selected or if any of the selected items are not drawing objects. */
punch(): boolean;
/** Removes all filters from the selected object(s).*/
removeAllFilters(): void;
/** Removes persistent data with the specified*/
removeDataFromDocument(name: string): void;
/** Removes persistent data with the specified */
removeDataFromSelection(name: string): void;
/** Removes the specified filter from the Filters list*/
removeFilter(filterIndex: number): void;
/** Renames the current profile.*/
renamePublishProfile(profileNewName?: string): boolean;
/** Renames the currently selected scene in the */
renameScene(name: string): boolean;
/** Moves the specified scene before another */
reorderScene(sceneToMove: number, sceneToPutItBefore: number): void;
/** Sets all values in the Property inspector to */
resetOvalObject(): void;
/** Sets all values in the Property inspector to */
resetRectangleObject(): void;
/** Resets the transformation matrix; equivalent to */
resetTransformation(): void;
/** Method; reverts the specified document to its previously saved version. This method is equivalent to selecting File > Revert. */
revert(): void;
///** Reverts the specified document to the version */
//revertToLastVersion();
/** applies a 3D rotation to the selection. This method is available only for movie clips. */
rotate3DSelection(xyzCoordinate: FlashPoint3D, bGlobalTransform: boolean): void;
/** Rotates the selection by a specified number of */
rotateSelection(angle: number, rotationPoint?: string): void;
/** Saves the document in its default location;*/
save(bOkToSaveAs?: boolean): boolean;
/** saves and compacts the file. This method is equivalent to selecting File > Save and Compact. */
saveAndCompact(bOkToSaveAs?: boolean): boolean;
//saveAsVersion(); // Saves a version of the specified document to the
/** Scales the selection by a specified amount;*/
scaleSelection(xScale: number, yScale: number, whichCorner?: string): void;
/** Selects all items on the Stage; equivalent to*/
selectAll(): void;
/** Deselects any selected items. */
selectNone(): void;
/** Sets the preferences for document.align(),*/
setAlignToDocument(bToStage?: boolean): void;
/** Sets the blending mode for the selected objects.*/
setBlendMode(mode: string): void;
/** Sets the fill settings for the Tools panel, Property */
setCustomFill(fill: FlashFill): void;
/** Sets the stroke settings for the Tools panel,*/
setCustomStroke(stroke: FlashStroke): void;
/** Sets the specified Element property on selected */
setElementProperty(property: string, value: number): void;
/** Sets the specified TextAttrs property of the */
setElementTextAttr(attrName: string, attrValue: FlashTextAttrs, startIndex?: number, endIndex?: number): boolean;
/** Changes the fill color of the selection to the */
setFillColor(color: any): void;
/** Sets a specified filter property for the currently */
setFilterProperty(property: string, filterIndex: number, value: any): void;
/** Applies filters to the selected objects .*/
setFilters(filterArray: FlashFilter[]): void;
/** Sets the opacity of the instance. */
setInstanceAlpha(opacity: number): void;
/** Sets the brightness for the instance. */
setInstanceBrightness(brightness: number): void;
/** Sets the tint for the instance.*/
setInstanceTint(color: any, strength: number): void;
/** Sets the XML metadata for the specified */
setMetadata(strMetadata: string): boolean;
/** Sets the value of an XML settings string in a */
setMobileSettings(xmlString: string): boolean;
/** Specifies a value for a specified property of*/
setOvalObjectProperty(propertyName: string, value: any): void;
/** Sets the version of the Flash Player targeted by*/
setPlayerVersion(version: string): boolean;
/** Specifies a value for a specified property of*/
setRectangleObjectProperty(propertyName: string, value: any): void;
/** Moves and resizes the selection in a single */
setSelectionBounds(boundingRectangle: FlashRectangle, bContactSensitiveSelection?: boolean): void;
/** Draws a rectangular selection marquee relative */
setSelectionRect(rect: FlashRectangle, bReplaceCurrentSelection?: boolean, bContactSensitiveSelection?: boolean): void;
/** Specifies the vanishing point for viewing 3D objects. */
setStageVanishingPoint(point: FlashPoint): void;
setStageViewAngle(angle: number): void;
/** Sets the color, width, and style of the selected */
setStroke(color: any, size: number, strokeType: string): void;
/** Changes the stroke color of the selection to the*/
setStrokeColor(color: any): void;
/** Changes the stroke size of the selection to the*/
setStrokeSize(size: number): void;
/** Changes the stroke style of the selection to the */
setStrokeStyle(strokeType: string): void;
/** Changes the bounding rectangle for the selected */
setTextRectangle(boundingRectangle: FlashRectangle): boolean;
/** Sets the text selection of the currently selected */
setTextSelection(startIndex: number, endIndex: number): boolean;
/** Inserts a string of text. */
setTextString(text: string, startIndex?: number, endIndex?: number): boolean;
/** Moves the transformation point of the current */
setTransformationPoint(transformationPoint: FlashPoint): void;
/** Skews the selection by a specified amount. */
skewSelection(xSkew: number, ySkew: number, whichEdge?: string): void;
/** Smooths the curve of each selected fill outline or */
smoothSelection(): void;
/** Spaces the objects in the selection evenly. */
space(direction: string, bUseDocumentBounds?: boolean): void;
/** Straightens the currently selected strokes; */
straightenSelection(): void;
/** Swaps the current selection with the specified */
swapElement(name: string): void;
/** Swaps the Stroke and Fill colors. */
swapStrokeAndFill(): void;
//synchronizeWithHeadVersion(); // Synchronizes the specified document with the
/** Executes a Test Movie operation on the */
testMovie(): void;
/** Executes a Test Scene operation on the current */
testScene(): void;
/** Performs a trace bitmap on the current selection; */
traceBitmap(threshold: number, minimumArea: number, curveFit: string, cornerThreshold: string): void;
transformSelection(a: number, b: number, c: number, d: number): void; // Performs a general transformation on the current
unGroup(): void; // Ungroups the current selection.
union(): void; // Combines all selected shapes into a drawing
unlockAllElements(): void; // Unlocks all locked elements on the currently
xmlPanel(fileURI: string): any; // Posts a XMLUI dialog box.
accName: string; // A string that is equivalent to the Name field in the
as3AutoDeclare: boolean; // A Boolean value that describes whether the
as3Dialect: string; // A string that describes the ActionScript 3.0
as3ExportFrame: number; // An integer that specifies in which frame to export
as3StrictMode: boolean; // A Boolean value that specifies whether the
as3WarningsMode: boolean; // A Boolean value that specifies whether the
asVersion: number; // An integer that specifies which version of
autoLabel: boolean; // A Boolean value that is equivalent to the Auto
backgroundColor: any; // A string, hexadecimal value, or integer that
currentPublishProfile: string; // A string that specifies the name of the active
currentTimeline: FlashTimeline; // An integer that specifies the index of the active
description: string; // A string that is equivalent to the Description field in
docClass; // Specifies the top-level ActionScript 3.0 class
forceSimple: boolean; // A Boolean value that specifies whether the children
frameRate: number; // A float value that specifies the number of frames
height: number; // An integer that specifies the height of the
id: number; // A unique integer (assigned automatically) that
library: FlashLibrary; // Read-only; the library object for a document.
livePreview: boolean; // A Boolean value that specifies if Live Preview is
name: string; // Read-only; a string that represents the name of a
path: string; // Read-only; a string that represents the path of the
pathURI: string; // Read-only property; a string that represents the path of the document, expressed as a file:/// URI. If the document has never been saved, this property is undefined.
publishProfiles: string[]; // Read-only; an array of the publish profile names for
/** Read-only; the current ScreenOutline object for the */
// Not available in CS5
//screenOutline: FlashScreenOutline;
/** An array of the selected objects in the document. */
selection: FlashElement[];
/** A Boolean value that specifies whether the object */
silent: boolean;
/** Read-only; an array of Timeline objects (see */
timelines: FlashTimeline[];
/** Read-only; a Matrix object. */
viewMatrix: FlashMatrix;
/** An integer that specifies the width of the document */
width: number;
/** Specifies the zoom percent of the Stage at author */
zoomFactor: number;
}
interface FlashText {
getTextAttr();
getTextString();
setTextAttr();
setTextString();
accName: string;
antiAliasSharpness: number;
antiAliasThickness: number;
autoExpand: boolean;
border: boolean;
description: string;
embeddedCharacters: string;
}
interface FlashTextAttrs extends FlashText {
aliasText: boolean;
alignment: string;
autoKern: boolean;
bold: boolean;
characterPosition: string;
characterSpacing: number;
face: string;
fillColor: any;
indent: number;
italic: boolean;
leftMargin: number;
letterSpacing: number;
lineSpacing: number;
rightMargin: number;
rotation: boolean;
size: number;
target: string;
url: string;
}
interface FlashFLfile {
copy(fileURI:string, copyURI:string): boolean;
createFolder(folderURI:string): boolean;
exists(fileURI:string): boolean;
getAttributes(fileOrFolderURI:string): string;
getCreationDate(fileOrFolderURI:string): string;
getCreationDateObj(fileOrFolderURI:string): Date;
getModificationDate(fileOrFolderURI:string): string;
getModificationDateObj(fileOrFolderURI: string): Date;
getSize(fileURI: string): number;
listFolder(folderURI: string, filesOrDirectories?: boolean): string[];
platformPathToURI(fileName: string): string;
read(fileOrFolderURI: string): string;
remove(fileOrFolderURI: string): boolean;
setAttributes(fileURI: string, strAttrs: string): boolean;
uriToPlatformPath(fileURI: string): string;
write(fileURI: string, textToWrite: string, strAppendMode?: string): boolean;
}
interface FlashSoundItem {
}
// if FlashElement.elementType == 'instance'
interface FlashInstance {
instanceType?: string;
libraryItem?: FlashItem;
}
interface _FlashBitmap {
width; height; depth; bits; cTab?: string[];
}
// if FlashElement.elementType == 'instance'
interface FlashBitmapInstance {
getBits(): _FlashBitmap;
setBits(bitmap: _FlashBitmap): void;
hPixels: number;
vPixels: number;
}
interface FlashCompiledClipInstance {
accName: string;
actionScript: string;
description: string;
forceSimple: boolean;
shortcut: string;
silent: boolean;
tabIndex: number;
}
interface FlashSymbolInstance {
accName: string;
actionScript: string;
backgroundColor: string;
bitmapRenderMode: string;
blendMode: string;
buttonTracking: string;
cacheAsBitmap: boolean;
colorAlphaAmount: number;
colorAlphaPercent: number;
colorBlueAmount: number;
colorBluePercent: number;
colorGreenAmount: number;
colorGreenPercent: number;
colorMode: string;
colorRedAmount: number;
colorRedPercent: number;
description: string;
filters: FlashFilter[];
firstFrame: number;
forceSimple: boolean;
loop: string;
shortcut: string;
silent: boolean;
symbolType: string;
tabIndex: number;
useBackgroundColor: boolean;
visible: boolean;
}
interface FlashComponentInstance {
parameters: any[];
}
/**
* The Shape object is a subclass of the Element object. The Shape object provides more precise control
* than the drawing APIs when manipulating or creating geometry on the Stage. This control is necessary
* so that scripts can create useful effects and other drawing commands (seeElement object).
* All Shape methods and properties that change a shape or any of its subordinate parts must be placed between
* shape.beginEdit() and shape.endEdit() calls to function correctly.
*/
interface FlashShape extends FlashOval {
getCubicSegmentPoints(cubicSegmentIndex: number): FlashPoint[];
beginEdit(): void;
deleteEdge(index: number): void;
endEdit(): void;
contours: FlashContour[];
edges: FlashEdge[];
isDrawingObject: boolean;
isGroup: boolean;
isOvalObject: boolean;
isRectangleObject: boolean;
members: FlashShape[];
numCubicSegments: number;
vertices: FlashVertex[];
}
interface FlashElement extends FlashInstance, FlashBitmapInstance, FlashCompiledClipInstance, FlashSymbolInstance, FlashComponentInstance, FlashShape {
getPersistentData(name: string): any;
getTransformationPoint(): FlashPoint;
hasPersistentData(name:string): boolean;
removePersistentData(name:string): void;
setPersistentData(name:string, type:string, value: any):void;
setTransformationPoint(transformationPoint: FlashPoint): void;
depth: number;
/**
* Read-only property; a string that represents the type of the specified element.
* The value is one of the following: "shape", "text", "instance", or "shapeObj".
* A "shapeObj" is created with an extensible tool.
*/
elementType: string;
height: number;
layer: FlashLayer;
left: number;
locked: boolean;
matrix: FlashMatrix;
name: string;
rotation: number;
scaleX: number;
scaleY: number;
selected: boolean;
skewX: number;
skewY: number;
top: number;
transformX: number;
transformY: number;
width: number;
x: number;
y: number;
}
interface FlashFrame {
getCustomEase();
setCustomEase();
actionScript;
duration;
elements: FlashElement[];
hasCustomEase;
labelType;
motionTweenOrientToPath;
motionTweenRotate;
motionTweenRotateTimes;
motionTweenScale;
motionTweenSnap;
motionTweenSync;
name;
shapeTweenBlend;
soundEffect;
soundLibraryItem:FlashSoundItem;
soundLoop;
soundLoopMode;
soundName;
soundSync;
startFrame;
tweenEasing;
tweenType;
useSingleEaseCurve;
}
interface FlashSymbolItem {
convertToCompiledClip(): void;
exportSWC(outputURI: string): void;
exportSWF(outputURI: string): void;
scalingGrid: boolean;
scalingGridRect: FlashRectangle;
sourceAutoUpdate: boolean;
sourceFilePath: string;
sourceLibraryName: string;
symbolType: string;
timeline: FlashTimeline;
}
interface FlashFolderItem {
}
interface FlashFontItem {
// Specifies whether the Font item is bitmapped.
bitmap: boolean;
// Specifies whether the Font item is bold.
bold: boolean;
// Specifies characters to embed.
embeddedCharacters: string;
// Specifies items that can be selected in the Font Embedding dialog.
embedRanges: string;
// Specifies whether variant glyphs should be output in the font when publishing a SWF file.
embedVariantGlyphs: boolean;
// The name of the device font associated with the Font item.
font: string;
// Specifies the format of the font that is output when publishing a SWF filem.
isDefineFont4Symbol: boolean;
// Specifies whether the Font item is italic.
italic: boolean;
// The size of the Font item, in points.
size: number;
}
interface FlashSoundItem {
exportToFile(fileURI: string): boolean;
bitRate: string;
bits: string;
compressionType: string;
convertStereoToMono: boolean;
fileLastModifiedDate: string;
originalCompressionType: string;
quality: string;
sampleRate: string;
sourceFileExists: boolean;
}
interface FlashVideoItem {
exportToFLV(fileURI: string): boolean;
fileLastModifiedDate: string;
sourceFileExists: boolean;
sourceFileIsCurrent: boolean;
sourceFilePath: string;
videoType: string;
}
interface FlashBitmapItem {
exportToFile(fileURI: string): boolean;
allowSmoothing: boolean;
compressionType: string;
fileLastModifiedDate: string;
originalCompressionType: string;
sourceFileExists: boolean;
sourceFileIsCurrent: boolean;
sourceFilePath: string;
useDeblocking: boolean;
useImportedJPEGQuality: boolean;
}
interface FlashItem extends FlashSymbolItem, FlashFolderItem, FlashFontItem, FlashSoundItem, FlashVideoItem, FlashBitmapItem, FlashBitmapItem {
addData(name: string, type: string, data: any): void;
getData(name: string): any;
hasData(name: string): boolean;
removeData(name: string): void;
/** Read-only; a string that specifies the type of element. "undefined", "component", "movie clip", "graphic", "button", "folder", "font", "sound", "bitmap", "compiled clip", "screen", or "video" */
itemType: string;
linkageBaseClass: string;
linkageClassName: string;
linkageExportForAS: boolean;
linkageExportForRS: boolean;
linkageExportInFirstFrame: boolean;
linkageIdentifier: string;
linkageImportForRS: boolean;
linkageURL: string;
/** A string that specifies the name of the library item, which includes the folder structure. */
name: string;
}
interface FlashLayer {
color: any;
frameCount: number;
frames: FlashFrame[];
height: number;
layerType: string;
locked: boolean;
name: string;
outline: boolean;
parentLayer: FlashLayer;
visible:boolean;
}
interface FlashLibrary {
addItemToDocument(position: FlashPoint, namePath?: string): boolean;
/** "video", "movie clip", "button", "graphic", "bitmap", "screen", and "folder" */
addNewItem(type: string, namePath?: string): boolean;
deleteItem(namePath?: string): boolean;
/** Method; makes a copy of the currently selected or specified item. The new item has a default name (such as item copy) and is set as the currently selected item. If more than one item is selected, the command fails. */
duplicateItem(namePath: string): boolean;
editItem(namePath?: string): boolean;
expandFolder(bExpand: boolean, bRecurseNestedParents?: boolean, namePath?: string): boolean;
findItemIndex(namePath: string): number;
getItemProperty(property: string): string;
getItemType(namePath?: string): string;
/** An array of values for all currently selected items in the library. */
getSelectedItems(): FlashItem[];
importEmbeddedSWF(linkageName: string, swfData: any[], libName?: string): void;
itemExists(namePath: string): boolean;
moveToFolder(folderPath: string, itemToMove?: string, bReplace?: boolean): boolean;
/** Method; creates a new folder with the specified name, or a default name ("untitled folder #" ) if no folderName parameter is provided, in the currently selected folder. */
newFolder(folderPath?: string): boolean;
/** Method; renames the currently selected library item in the Library panel. */
renameItem(name: string): boolean;
/** Method; selects or deselects all items in the library. */
selectAll(bSelectAll?: boolean): void;
/** Method; selects a specified library item. */
selectItem(namePath: string, bReplaceCurrentSelection?: boolean, bSelect?: boolean): boolean;
/** Method; deselects all the library items. */
selectNone(): void;
/** Method; sets the property for all selected library items (ignoring folders). */
setItemProperty(property: string, value: any): void;
/** Method; updates the specified item. */
updateItem(namePath: string): boolean;
/** Property; an array of item objects in the library. */
items: FlashItem[];
}
interface FlashMath {
/** Method; performs a matrix concatenation and returns the result. */
concatMatrix(mat1: FlashMatrix, mat2: FlashMatrix): FlashMatrix;
/** A Matrix object that is the inverse of the original matrix. */
invertMatrix(mat: FlashMatrix): FlashMatrix;
/** A floating-point value that represents the distance between the points. */
pointDistance(pt1: FlashPoint, pt2: FlashPoint): number;
}
interface FlashOutputPanel {
/** Method; clears the contents of the Output panel. You can use this method in a batch processing application to clear a list of errors, or to save them incrementally by using this method withoutputPanel.save(). */
clear(): void;
save(fileURI: string, bAppendToFile?: boolean, bUseSystemEncoding?: boolean): void;
trace(message:string):void;
}
/**
* The HalfEdge object is the directed side of the edge of a Shape object.
* An edge has two half edges. You can transverse the contours of a shape by "walking around"
* these half edges. For example, starting from a half edge, you can trace all the half edges
* around a contour of a shape, and return to the original half edge. Half edges are ordered.
* One half edge represents one side of the edge; the other half edge represents the other side.
*/
interface FlashHalfEdge {
getEdge(): FlashEdge;
getNext(): FlashHalfEdge;
getOppositeHalfEdge(): FlashHalfEdge;
getPrev(): FlashHalfEdge;
getVertex(): FlashVertex;
id: number;
index: number;
}
/** The Oval object is a shape that is drawn using the Oval Primitive tool. To determine if an item is an Oval object, use shape.isOvalObject. */
interface FlashOval {
/** Read-only property; a Boolean value that specifies whether the Close Path check box in the Property inspector is selected. If the start angle and end angle values for the object are the same, setting this property has no effect until the values change. To set this value, use document.setOvalObjectProperty(). */
closePath: boolean;
/** Read-only property; a float value that specifies the end angle of the Oval object. Acceptable values are from 0 to 360. */
endAngle: number;
/** Read-only property; a float value that specifies the inner radius of the Oval object as a percentage. Acceptable values are from 0 to 99. */
innerRadius: number;
/** Read-only property; a float value that specifies the start angle of the Oval object. Acceptable values are from 0 to 360. To set this value, use document.setOvalObjectProperty(). */
startAngle: number;
}
/**
* This object contains all the properties of the Fill color setting of the Tools panel or of a selected shape. To retrieve a Fill object, use document.getCustomFill().
*/
interface FlashFill {
bitmapIsClipped: boolean;
bitmapPath: string;
/** Property; the color of the fill, in one of the following formats:
* - A string in the format "#RRGGBB" or "#RRGGBBAA"
* - A hexadecimal number in the format 0xRRGGBB
* - An integer that represents the decimal equivalent of a hexadecimal number
*/
color: any;
/** Property; an array of colors in the gradient, expressed as integers. This property is available only if the value of the fill.style property is either "radialGradient" or "linearGradient". See fill.style */
colorArray: any[];
focalPoint: number;
linearRGB: boolean;
matrix: FlashMatrix;
overflow: string;
posArray: number[];
style: string;
}
interface FlashContour {
getHalfEdge(): FlashHalfEdge;
fill: FlashFill;
interior: boolean;
orientation: number;
}
interface FlashStroke {
/// A Boolean value, same as the Sharp Corners setting in the custom Stroke Style dialog box.
breakAtCorners: boolean;
/// A string that specifies the type of cap for the stroke.
capType: string;
/// A string, hexadecimal value, or integer that represents the stroke color.
color: any;
/// A string that specifies the type of hatching for the stroke.
curve: string;
/// An integer that specifies the lengths of the solid part of a dashed line.
dash1: number;
/// An integer that specifies the lengths of the blank part of a dashed line.
dash2: number;
/// A string that specifies the density of a stippled line.
density: string;
/// A string that specifies the dot size of a stippled line.
dotSize: string;
/// An integer that specifies the spacing between dots in a dotted line.
dotSpace: number;
/// A string that specifies the thickness of a hatch line.
hatchThickness: string;
/// A string that specifies the jiggle property of a hatched line.
jiggle: string;
/// A string that specifies the type of join for the stroke.
joinType: string;
/// A string that specifies the length of a hatch line.
length: string;
/// A float value that specifies the angle above which the tip of the miter will be truncated by a segment.
miterLimit: number;
/// A string that specifies the pattern of a ragged line.
pattern: string;
/// A string that specifies the rotation of a hatch line.
rotate: string;
/// A string that specifies the type of scale to be applied to the stroke.
scaleType: string;
/// A Fill object that represents the fill settings of the stroke.
shapeFill: FlashFill;
/// A string that specifies the spacing of a hatched line.
space: string;
/// A Boolean value that specifies whether stroke hinting is set on the stroke.
strokeHinting: boolean;
/// A string that describes the stroke style.
style: string;
/// An integer that specifies the stroke size.
thickness: number;
/// A string that specifies the variation of a stippled line.
variation: string;
/// A string that specifies the wave height of a ragged line.
waveHeight: string;
/// A string that specifies the wave length of a ragged line.
waveLength: string;
}
interface FlashEdge {
getControl(i: number): FlashPoint;
getHalfEdge(index: number): FlashHalfEdge;
setControl(index: number, x:number, y:number): void;
splitEdge(t: number): void;
cubicSegmentIndex: number;
id: number;
isLine: boolean;
stroke: FlashStroke;
}
interface FlashVertex {
getHalfEdge(): FlashHalfEdge;
setLocation(x: number, y: number);
x: number;