Class SWFAddress

The SWFAddress class can be configured with query parameters using the following format: swfaddress.js?history=1&tracker=pageTracker._trackPageview&strict=1.
The list of supported options include:

history:Boolean - Enables or disables the creation of history entries.
strict:Boolean - Enables or disables the strict mode.
tracker:String - Sets a function for page view tracking.

Public Properties

onChange:Function
[static] Change event.
onExternalChange:Function
[static] External change event.
onInit:Function
[static] Init event.
onInternalChange:Function
[static] Internal change event.

Public Methods

addEventListener(type, listener): void
[static] Registers an event listener.
addId(id): void
[static] Adds an id to the list of Flash object registered for deep linking.
back(): void
[static] Loads the previous URL in the history list.
dispatchEvent(event): Boolean
[static] Dispatches an event to all the registered listeners.
forward(): void
[static] Loads the next URL in the history list.
up(): void
[static] Navigates one level up in the deep linking path.
getBaseURL(): String
[static] Provides the base address of the document.
getHistory(): Boolean
[static] Provides the state of the history setting.
getId(index): String
[static] Provides the id the first and probably the only Flash object registered.
getIds(): Array
[static] Provides a list of all the Flash objects registered.
getParameter(param): Object
[static] Provides the value of a specific query parameter as a string or array of strings.
getParameterNames(): Array
[static] Provides a list of all the query parameter names.
getPath(): String
[static] Provides the deep linking value without the query string.
getPathNames(): Array
[static] Provides a list of all the folders in the deep linking path.
getQueryString(): String
[static] Provides the query string part of the deep linking value.
getStatus(): String
[static] Provides the status of the browser window.
getStrict(): Boolean
[static] Provides the state of the strict mode setting.
getTitle(): String
[static] Provides the title of the HTML document.
getTracker(): String
[static] Provides the tracker function.
getValue(): String
[static] Provides the current deep linking value.
go(delta): void
[static] Loads a URL from the history list.
hasEventListener(event): Boolean
[static] Checks the existance of any listeners registered for a specific type of event.
href(url, target): void
[static] Opens a new URL in the browser.
popup(url, name, options, handler): void
[static] Opens a browser popup window.
removeEventListener(type, listener): void
[static] Removes an event listener.
removeId(id): void
[static] Removes an id from the list of Flash object registered for deep linking.
resetStatus(): void
[static] Resets the status of the browser window.
setHistory(history): void
[static] Enables or disables the creation of history entries.
setId(id): void
[static] Sets the id of a single Flash object which will be registered for deep linking.
setStatus(status): void
[static] Sets the status of the browser window.
setStrict(strict): void
[static] Enables or disables the strict mode.
setTitle(title): void
[static] Sets the title of the HTML document.
setTracker(tracker): void
[static] Sets a function for page view tracking.
setValue(value): void
[static] Sets the current deep linking value.

Property Detail

onChange

public static var onChange:Function

Change event.


onExternalChange

public static var onExternalChange:Function

External change event.


onInit

public static var onInit:Function

Init event.


onInternalChange

public static var onInternalChange:Function

Internal change event.


Method Detail

addEventListener

public static function addEventListener(type, listener):void

Registers an event listener.

Parameters:
type:String - Event type.
listener:Function - Event listener.

addId

public static function addId(id):void

Adds an id to the list of Flash object registered for deep linking.

Parameters:
id:String - ID of the object.

back

public static function back():void

Loads the previous URL in the history list.


dispatchEvent

public static function dispatchEvent(event):Boolean

Dispatches an event to all the registered listeners.

Parameters:
event:Object - Event object.
Returns:
Boolean 

forward

public static function forward():void

Loads the next URL in the history list.


up

public static function up():void

Navigates one level up in the deep linking path.


getBaseURL

public static function getBaseURL():String

Provides the base address of the document.

Returns:
String 

getHistory

public static function getHistory():Boolean

Provides the state of the history setting.

Returns:
Boolean 

getId

public static function getId(index):String

Provides the id the first and probably the only Flash object registered.

Parameters:
index
Returns:
String 

getIds

public static function getIds():Array

Provides a list of all the Flash objects registered.

Returns:
Array 

getParameter

public static function getParameter(param):Object

Provides the value of a specific query parameter as a string or array of strings.

Parameters:
param:String - Parameter name.
Returns:
Object 

getParameterNames

public static function getParameterNames():Array

Provides a list of all the query parameter names.

Returns:
Array 

getPath

public static function getPath():String

Provides the deep linking value without the query string.

Returns:
String 

getPathNames

public static function getPathNames():Array

Provides a list of all the folders in the deep linking path.

Returns:
Array 

getQueryString

public static function getQueryString():String

Provides the query string part of the deep linking value.

Returns:
String 

getStatus

public static function getStatus():String

Provides the status of the browser window.

Returns:
String 

getStrict

public static function getStrict():Boolean

Provides the state of the strict mode setting.

Returns:
Boolean 

getTitle

public static function getTitle():String

Provides the title of the HTML document.

Returns:
String 

getTracker

public static function getTracker():String

Provides the tracker function.

Returns:
String 

getValue

public static function getValue():String

Provides the current deep linking value.

Returns:
String 

go

public static function go(delta):void

Loads a URL from the history list.

Parameters:
delta:Number - An integer representing a relative position in the history list.

hasEventListener

public static function hasEventListener(event):Boolean

Checks the existance of any listeners registered for a specific type of event.

Parameters:
event:String - Event type.
Returns:
Boolean 

href

public static function href(url, target):void

Opens a new URL in the browser.

Parameters:
url:String - The resource to be opened.
target:String - Target window.

popup

public static function popup(url, name, options, handler):void

Opens a browser popup window.

Parameters:
url:String - Resource location.
name:String - Name of the popup window.
options:String - Options which get evaluted and passed to the window.open() method.
handler:String - Optional JavaScript code for popup handling.

removeEventListener

public static function removeEventListener(type, listener):void

Removes an event listener.

Parameters:
type:String - Event type.
listener:Function - Event listener.

removeId

public static function removeId(id):void

Removes an id from the list of Flash object registered for deep linking.

Parameters:
id:String - ID of the object.

resetStatus

public static function resetStatus():void

Resets the status of the browser window.


setHistory

public static function setHistory(history):void

Enables or disables the creation of history entries.

Parameters:
history:Boolean - History state.

setId

public static function setId(id):void

Sets the id of a single Flash object which will be registered for deep linking.

Parameters:
id:String - ID of the object.

setStatus

public static function setStatus(status):void

Sets the status of the browser window.

Parameters:
status:String - Status value.

setStrict

public static function setStrict(strict):void

Enables or disables the strict mode.

Parameters:
strict:Boolean - Strict mode state.

setTitle

public static function setTitle(title):void

Sets the title of the HTML document.

Parameters:
title:String - Title value.

setTracker

public static function setTracker(tracker):void

Sets a function for page view tracking. By default both 'urchinTracker' and 'pageTracker._trackPageview' are automatically invoked.

Parameters:
tracker:String - Tracker function.

setValue

public static function setValue(value):void

Sets the current deep linking value.

Parameters:
value:String - A value which will be appended to the base link of the HTML document.