Packagecom.jeffdePascale.fosfr
Classpublic dynamic class FosfrMainSWF
InheritanceFosfrMainSWF Inheritance FosfrInitializeSWFPrototype Inheritance FosfrPrototype Inheritance flash.display.MovieClip

One of the core implementation classes for the Fosfr framework, the FosfrMainSWF class is one of three classes used when implementing Fosfr as a full site build, along with FosfrShellSWF and FosfrSubSWF.

FosfrMainSWF functions as the root of the site, handling instantiation of the Fosfr framework, preloading of FosfrShellSWF, and should be used to house the preloader visual element itself and the shell holder displayObject as well. Add event listeners to the ShellSWFPrequel instance to receive information about the preload events. For more information, see the documentation for Prequel at http://www.jeffdepascale.com/blog/documentation


Example
The following code shows a typical implementation of FosfrMainSWF as a document class, presuming you have an external configuration xml file located relative to this SWF file named "config.xml". Listeners have been added to the prequel instance for preloading purposes as well.
 
 package  {
    
      import com.jeffdePascale.fosfr.FosfrMainSWF;
    
      public class FosfrMainExample extends FosfrMainSWF {
    
          public function FosfrMainExample() {
           createFosfr("config.xml");
       }
 
       public override function init():void {
           shellSWFPrequel.addEventListener(PrequelEvent.PROGRESS, eProgressHandler);
              shellSWFPrequel.addEventListener(Event.COMPLETE, eCompleteHandler);
          }
    
          private function eCompleteHandler(e:Event):void {
              debug("complete load");
          }
              private function eProgressHandler(e:PrequelEvent):void {
              debug(e.totalPercent);
          }
      }
    }
 
 



Public Properties
 PropertyDefined by
  fosfr : Fosfr
[read-only] An instance of the Fosfr class.
FosfrMainSWF
  shellSWFPrequel : Prequel
[read-only] / An instance of the Prequel class instantiated in the ShellLoader class of the fosfr.navigation package.
FosfrMainSWF
Public Methods
 MethodDefined by
  
Creates a new FosfrLiteSWF instance.
FosfrMainSWF
  
createFosfr(xmlURL:String = null):void
FosfrMainSWF
 Inherited
debug(str:*):void
provides a document class level shortcut to the fosfr.debug.update() method.
FosfrPrototype
 Inherited
init():void
Called automatically upon completion of the initialization process by Fosfr, this method should be overriden and used as the starting point for the SWF file.
FosfrPrototype
 Inherited
track(tag:String, forceMethod:String = null, ... args):void
provides a document class level shortcut to the fosfr.tracking.track() method.
FosfrPrototype
Property detail
fosfrproperty
fosfr:Fosfr  [read-only]

An instance of the Fosfr class.

Implementation
    public function get fosfr():Fosfr

See also

shellSWFPrequelproperty 
shellSWFPrequel:Prequel  [read-only]

/ An instance of the Prequel class instantiated in the ShellLoader class of the fosfr.navigation package.

Implementation
    public function get shellSWFPrequel():Prequel
Constructor detail
FosfrMainSWF()constructor
public function FosfrMainSWF()

Creates a new FosfrLiteSWF instance.

Method detail
createFosfr()method
public override function createFosfr(xmlURL:String = null):void

Parameters
xmlURL:String (default = null)