NavigateUtil

Kind of class:public class
Package:org.casalib.util
Inherits from:none
Version:12/04/08
Author:Aaron Clinger
Classpath:org.casalib.util.NavigateUtil
File last modified:Thursday, 19 February 2009, 11:33:36
Simplifies navigateToURL and window.open requests.

Summary


Constants
Class methods
  • openUrl (request:*, window:String = NavigateUtil.WINDOW_SELF) : void
    • Simlifies navigateToURL by allowing you to either use a String or an URLRequest reference to the URL.
  • openWindow (url:String, window:String = NavigateUtil.WINDOW_BLANK, features:String = "") : Boolean
    • A Flash wrapper for JavaScript’s window.open.

Constants

WINDOW_BLANK

public static const WINDOW_BLANK:String = '_blank'
(read)

WINDOW_PARENT

public static const WINDOW_PARENT:String = '_parent'
(read)

WINDOW_SELF

public static const WINDOW_SELF:String = '_self'
(read)

WINDOW_TOP

public static const WINDOW_TOP:String = '_top'
(read)

Class methods

openUrl

public static function openUrl (
request:*, window:String = NavigateUtil.WINDOW_SELF) : void

Simlifies navigateToURL by allowing you to either use a String or an URLRequest reference to the URL. This method also helps prevent pop-up blocking by trying to use openWindow before calling navigateToURL.
Parameters:
request:
A String or an URLRequest reference to the URL you wish to open/navigate to.
window :
The browser window or HTML frame in which to display the URL indicated by the request parameter.
Throws:
  • ArguementTypeError if you pass a value type other than a String or URLRequest to parameter request.

openWindow

public static function openWindow (
url:String, window:String = NavigateUtil.WINDOW_BLANK, features:String = "") : Boolean

A Flash wrapper for JavaScript’s window.open.
Parameters:
url :
Specifies the URL you wish to open/navigate to.
window :
The browser window or HTML frame in which to display the URL indicated by the url parameter.
features:
Defines the various window features to be included.
Returns:
  • Returns true if the window was successfully created; otherwise false.