Packagenet.guttershark.control
Classpublic class Frame1Controller
InheritanceFrame1Controller Inheritance flash.display.MovieClip

The Frame1Controller class is a controller you can use for movies that have two frames on the root - the 1st frame being the preloader, the second being for the application start (where all other classes are exported in frame 2).

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


Example
Subclassing Frame1Controller:
 
  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;
          }
      }
  }
  



Protected Properties
 PropertyDefined 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
Public Methods
 MethodDefined by
  
Constructor for Frame1Controller instances.
Frame1Controller
Protected Methods
 MethodDefined by
  
dispose():void
Dispose of this frame 1 controller, you should always call super.dispose() if you override this.
Frame1Controller
  
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
Property detail
pixelsToFillproperty
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
Constructor detail
Frame1Controller()constructor
public function Frame1Controller()

Constructor for Frame1Controller instances.

Method detail
dispose()method
protected function dispose():void

Dispose of this frame 1 controller, you should always call super.dispose() if you override this.

gotoStartFrame()method 
protected function 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.

onProgress()method 
protected function onProgress(pixels:int, percent:Number):void

A method you can override to accept pixels and percent on the progress of the swf loading.

Parameters
pixels:int
 
percent:Number