Class fever.core.CoreApplication

Description

Initialize properly the Fever Framework API's.

Never use this class directly, take a look at Fever class example to see how to initialize your application properly.

name property is used by GAnalytic to start logical track directory.
Default is the main access class name.

See Also

Field Index

config, contextMenu, listenApplicationShutDown, name, onFocusChangeEVENT, onResizeEVENT, onStateChangeEVENT, source, state, thread, url

Method Index

addEventListener(), broadcastEvent(), formatHistoryTitle(), formatSubTitle(), getArgument(), getCurrentTitle(), getFullTitle(), getInstance(), getLocation(), getSize(), getTitle(), hasArgument(), init(), isFullScreen(), isOnline(), openDocument(), openURL(), protect(), quit(), removeEventListener(), runProcess(), setFullScreenMode(), setLocation(), setSize(), setTitle(), start(), unprotect()

Field Detail

onFocusChangeEVENT

static public onFocusChangeEVENT:EventType
Broadcasted when application focus change.

onResizeEVENT

static public onResizeEVENT:EventType
Broadcasted when application is resized.

onStateChangeEVENT

static public onStateChangeEVENT:EventType
Broadcasted when application state change.

thread

public thread:FeverApplication [Read Only]
Read only. Reference to your main application class.

contextMenu

public contextMenu:FvContextMenu
Application context menu.

source

public source:String [Read Only]
Read only. Defines view source url

url

public url:String [Read Only]
Read only. Application url path.

config

public config:FeverConfiguration [Read Only]
Read only. Returns loaded configuration object.

name

public name:String [Read Only]
Read only. Application name.

state

public state:ApplicationState [Read Only]
Read only. Returns application state.

listenApplicationShutDown

public listenApplicationShutDown:Boolean
Indicates if Fever must warn the user of the closing of the application.
Default is true

If sets to false, all call to quit() method is equal to quit( false );

Method Detail

getInstance

static public function getInstance(app:FeverApplication, enableConfig:Boolean):CoreApplication

Don't use it in your development.

Fever class control it.

addEventListener

public function addEventListener(type:EventType, listener):Void

Adds passed-in listener for receiving passed-in type event type.

Parameters

typeName of the Event.
listenerListener object.

removeEventListener

public function removeEventListener(type:EventType, listener):Void

Removes passed-in listener that subscribed to passed-in type event type.

Parameters

typeName of the Event.
listenerListener object.

broadcastEvent

public function broadcastEvent(event:IEvent):Void

Broadcasts event to suscribed listeners.

Parameters

eventan IEvent instance

getArgument

public function getArgument(id:String)

Returns argument value defined by passed-in id.

In browser context, arguments are passed to application using swfobject.js script or throw the location url using the 'get' location format.

   var o = new SWFObject( "Demo_installer.swf", "fswf", "100%", "100%", "8", "#000000" );
   o.addVariable("myArg", "blabla");
   o.write("flashcontent"); 
 

or using an url like : http://www.mydomain.com/mypage.html?myArg=blabla

hasArgument

public function hasArgument(id:String):Boolean

Indicates if passed-in id argument is defined in application.

In browser context, arguments are passed to application using swfobject.js script or throw the location url using the 'get' location format.

   var o = new SWFObject( "demo.swf", "fswf", "100%", "100%", "8", "#000000" );
   o.addVariable("myArg", "blabla");
   o.write("flashcontent"); 
 

or using an url like : http://www.mydomain.com/mypage.html?myArg=blabla

Return

true if argument is defined, otherwise false

setTitle

public function setTitle(mainTitle:String, subTitle:String, historyCaption:String):Void

Sets application title.

Uses defined context to set the new application container title.

Take a look at ContextManager to see how to define context.

Parameters

mainTitlemain part of the title ( pass null to keep current )
subTitletitle complement ( pass null to keep current )
historyCaptionused to show history place ( pass null to keep current )

formatSubTitle

public function formatSubTitle(src:String):String

Formats the sub tile section of application title string.

formatHistoryTitle

public function formatHistoryTitle(src:String):String

Formats the history tile section of application title string.

getTitle

public function getTitle():String

Returns application title.

getFullTitle

public function getFullTitle():String

Returns full application title. ( with appended and history text )

getCurrentTitle

public function getCurrentTitle():String

Returns hard defined container title

setSize

public function setSize(width:Number, height:Number):Void

Sets application size.

Uses defined context to set the new application container size.

Take a look at ContextManager to see how to define context.

getSize

public function getSize():Rectangle

Returns application size.

setLocation

public function setLocation(x:Number, y:Number):Void

Sets application position in desktop.

Uses defined context to set the new application container size.

Take a look at ContextManager to see how to define context.

getLocation

public function getLocation():Point

Returns application location.

setFullScreenMode

public function setFullScreenMode(enabled:Boolean):Void

Defines fullscreen mode of application.

isFullScreen

public function isFullScreen():Boolean

Returns the fullscreen state.

isOnline

public function isOnline():Boolean

Indicates if application running online or not.

openDocument

public function openDocument(path:String):Void

Opens a external document located on path using context engine.

For example BrowserContext opens document in a new browser window, whereas StudioContext use his proper open mecanism.

openURL

public function openURL(url:String, window:String, method:String):Void

A simple call to Flash getURL() method.

runProcess

public function runProcess(app:String, args:String, workingDir:String, hidden:Boolean, waitFor:Boolean)

Launch external application and returns result ( if any )

protect

public function protect():Void

Display a protect screen of the top of application to avoid user interactions.

unprotect

public function unprotect():Void

Hides a possible protect screen defined using protect() method.

quit

public function quit(force:Boolean):Void

Quit application

init

public function init():Void

Internal call. Don't use it in development.

Call by Fever controller class.

start

public function start():Void

Internal call. Don't use it in development.