| Flashscript classes (ActionScript 3) | Home | MX | MX 2004 | Flash 8 | Flash 9 |Flash 10 |PHP |Components | Snippets | Contact | |
Preloader |
|
|
See also
| Property | Defined By |
|---|---|
|
barXpos
: int
Specifies the x position of the loader animation. |
Preloader |
|
barYpos
: int
Specifies the y position of the loader animation. |
Preloader |
| Method | Defined By |
|---|---|
|
Preloader()
Creates a new instance of the Preloader component. |
Preloader |
| Event | Defined By |
|---|---|
|
loadComplete This event is dispatched when the preloading is completed. |
Preloader |
| All inherited events for the Sprite class. | N/A |
| Property Detail |
|---|
|
barXpos property barXpos:int [read-write] Specifies the x position of the loader animation. The default value is 0. .Implementationpublic function get barXpos():intpublic function set barXpos(value:int):void |
|
barYpos property barYpos:int [read-write] Specifies the y position of the loader animation. The default value is 0. .Implementationpublic function get barYpos():intpublic function set barYpos(value:int):void |
| Constructor Detail |
|---|
|
Preloader () Constructor
public function Preloader() |
| Intializes a new Preloader instance. |
| Method Detail |
|---|
| N/A |
| Event Detail |
|---|
|
loadComplete event
Event Object Type:
biz.flashscript.components.preloader.Preloader
Dispatched when preloading is completed (see example). |
| Examples |
|---|
Create a new fla file and name it Preloader.fla. Place the fla in the same folder as the biz folder. Create a second frame and name it "frame2". Then add this script in a frame on the main timeline and test movie. You should see the timeline moving to frame 2.
stop ();
addEventListener(Preloader.LOAD_COMPLETE, completeHandler);
function completeHandler(ev:Event):void
{
trace("Loading is now complete!");
gotoAndStop("frame2");
}
|