import { DisplayObject, IAdvancable } from "./DisplayObject"; import { DisplayObjectContainer } from "./DisplayObjectContainer"; import { UncaughtErrorEvents } from "../events/UncaughtErrorEvents"; import { URLRequest } from "../net/URLRequest"; import { LoaderInfo } from "./LoaderInfo"; import { Stage } from "./Stage"; import { LoaderContext } from "../system/LoaderContext"; import { ByteArray } from "../../avm2/natives/byteArray"; import { EagerlyParsedDictionaryEntry } from "@awayjs/graphics"; import { AXClass } from '../../avm2/run/AXClass'; export declare class Loader extends DisplayObjectContainer implements IAdvancable { static axClass: typeof Loader & AXClass; static runtimeStartTime: number; private static _rootLoader; private static _loadQueue; private static _embeddedContentLoadCount; /** * Creates or returns the root Loader instance. The loader property of that instance's * LoaderInfo object is always null. Also, no OPEN event ever gets dispatched. */ static getRootLoader(): Loader; static reset(): void; static classInitializer(): void; static classSymbols: string[]; static instanceSymbols: string[]; /** * In each turn of the event loop, Loader events are processed in two batches: * first INIT and COMPLETE events are dispatched for all active Loaders, then * OPEN and PROGRESS. * * A slightly weird result of this is that INIT and COMPLETE are dispatched at * least one turn later than the other events: INIT is dispatched after the * content has been created. That, in turn, happens under * `DisplayObject.performFrameNavigation` in reaction to enough data being * marked as available - which happens in the second batch of Loader event * processing. */ static processEvents(): void; private static processEarlyEvents; private static processLateEvents; constructor(); _setStage(stage: Stage): void; _initFrame(advance: boolean): void; _constructFrame(): void; addChild(child: DisplayObject): DisplayObject; addChildAt(child: DisplayObject, index: number): DisplayObject; removeChild(child: DisplayObject): DisplayObject; removeChildAt(index: number): DisplayObject; setChildIndex(child: DisplayObject, index: number): void; private _content; private _contentID; private _contentLoaderInfo; private _uncaughtErrorEvents; private _fileLoader; private _imageSymbol; private _loadStatus; private _loadingType; private _queuedLoadUpdate; /** * No way of knowing what's in |data|, so do a best effort to print out some meaninfgul debug * info. */ private _describeData; get content(): DisplayObject; get contentLoaderInfo(): LoaderInfo; _getJPEGLoaderContextdeblockingfilter(context: LoaderContext): number; get uncaughtErrorEvents(): UncaughtErrorEvents; private _canLoadSWFFromDomain; load(request: URLRequest, context?: LoaderContext): void; loadBytes(data: ByteArray, context?: LoaderContext): void; close(): void; _unload(stopExecution: boolean, gc: boolean): void; unload(): void; unloadAndStop(gc: boolean): void; private _applyLoaderContext; onLoadOpen(file: any): void; onLoadProgress(update: any): void; onNewEagerlyParsedSymbols(dictionaryEntries: EagerlyParsedDictionaryEntry[], delta: number): Promise; onImageBytesLoaded(): void; private _applyDecodedImage; private _applyLoadUpdate; onLoadComplete(): void; onLoadError(): void; private _addScenesToMovieClip; private createContentRoot; private _createAVM1Context; /** * Create an AVM1Movie container and wrap the root timeline into it. * This associates the AVM1Context with this AVM1 MovieClip tree, * including potential nested SWFs. */ private _createAVM1Movie; }