Package | sekati.load |
Class | public class TextLoader |
Inheritance | TextLoader AbstractLoader flash.events.EventDispatcher |
Implements | ILoader |
String
content.
var loader : TextLoader = new TextLoader( "http://localhost/path/to/my.txt" ); loader.addEventListener( Event.INIT, readText ); loader.load( ); private function readText(e : Event) : void { loader.removeEventListener( Event.INIT, readText ); trace( "textfile contents: " + loader.content ); }
Property | Defined by | ||
---|---|---|---|
bytesLoaded : uint
The loader bytes loaded.
| AbstractLoader | ||
bytesTotal : uint
The loader bytes total.
| AbstractLoader | ||
content : String [read-only]
The strictly-typed text
String loader content. | TextLoader | ||
context : LoaderContext
Returns
LoaderContext (for Loader types only). | AbstractLoader | ||
dataFormat : String
Returns
URLLoaderDataFormat (for URLLoader types only). | AbstractLoader | ||
loading : Boolean
The loading status of the loader; if
true the loader is loading, if false the loader has not started yet. | AbstractLoader | ||
percent : Number
The loader percentile.
| AbstractLoader | ||
rawContent : *
The loosely-typed
AbstractLoader content. | AbstractLoader | ||
ready : Boolean
The ready status of the loader content; if
true the content is loaded, if false the content is not loaded. | AbstractLoader | ||
request : URLRequest
The loader
URLRequest . | AbstractLoader | ||
soundContext : SoundLoaderContext
Returns
SoundLoaderContext (for Sound types only). | AbstractLoader | ||
url : String
The loader url.
| AbstractLoader |
Method | Defined by | ||
---|---|---|---|
TextLoader(url:String)
TextLoader Constructor
| TextLoader | ||
close():void
Stop the loading process.
| AbstractLoader | ||
destroy():void
Cleanup the
AbstractLoader . | AbstractLoader | ||
dispatchEvent(e:Event):Boolean
Optimized
dispatchEvent only dispatches when there are listeners. | AbstractLoader | ||
load():void
Start the loading process.
| AbstractLoader |
content | property |
content:String
[read-only]
The strictly-typed text String
loader content.
public function get content():String
TextLoader | () | constructor |
public function TextLoader(url:String)
TextLoader Constructor
Parametersurl:String — of the text file.
|