| Package | net.guttershark.control |
| Class | public class Frame1Controller |
| Inheritance | Frame1Controller flash.display.MovieClip |
In that type of movie (2 frames), you extend this class for the Document Class, then place an instance of a movie clip on frame 2 that is bound to a subclass of DocumentController - there is an example in examples/control/frame1controller.
You also need to update what frame to export classes in: file->publish settings->flash-> settings->export classes in frame->2
package
{
public class MyFrame1Controller extends Frame1Controller()
{
//onstage (only declare what's on frame 1 && don't give an instance name to the main clip on frame 2).
public var preloader:MovieClip;
public var percentLabel:TextField;
public function MyFrame1Controller()
{
super();
}
override protected function get pixelsToFill():int
{
return 550;
}
override protected function gotoStartFrame():void
{
gotoAndStop(2);
dispose();
}
override protected function onProgress(pixels:int,percent:Number):void
{
trace("preload complete, start the app/site.");
gotoAndStop(2); //the real function call.
}
override protected function dispose():void
{
super.dispose();
trace("dispose");
preloader = null;
percentLabel = null;
}
}
}
| Property | Defined by | ||
|---|---|---|---|
| pixelsToFill : int
A stub method you should override to alter the amount
of pixels your site preloader needs to fill - the
default is 100.
| Frame1Controller | ||
| Method | Defined by | ||
|---|---|---|---|
|
Constructor for Frame1Controller instances.
| Frame1Controller | ||
| Method | Defined by | ||
|---|---|---|---|
|
dispose():void
Dispose of this frame 1 controller, you should always call
super.dispose() if you override this.
| Frame1Controller | ||
|
gotoStartFrame():void
A method you can override to control which frame to gotoAndStop
after the swf has completely downloaded - that frame should be
the application start frame, the default frame is 2.
| Frame1Controller | ||
|
onProgress(pixels:int, percent:Number):void
A method you can override to accept pixels and percent on the progress
of the swf loading.
| Frame1Controller | ||
| pixelsToFill | property |
pixelsToFill:int [read-write]A stub method you should override to alter the amount of pixels your site preloader needs to fill - the default is 100.
Implementation protected function get pixelsToFill():int
protected function set pixelsToFill(value:int):void
| Frame1Controller | () | constructor |
public function Frame1Controller()Constructor for Frame1Controller instances.
| dispose | () | method |
protected function dispose():voidDispose of this frame 1 controller, you should always call super.dispose() if you override this.
| gotoStartFrame | () | method |
protected function gotoStartFrame():voidA method you can override to control which frame to gotoAndStop after the swf has completely downloaded - that frame should be the application start frame, the default frame is 2.
| onProgress | () | method |
protected function onProgress(pixels:int, percent:Number):voidA method you can override to accept pixels and percent on the progress of the swf loading.
Parameterspixels:int |
|
percent:Number |