Class com.wiicade.Browser

Description

This class provides functions for controlling the behavior of the Wii Internet Channel Browser. The primary use of this class is to enable and disable the default actions of the Wii Remote buttons on the controller.

By default, this API attempts to disable all Wii Remote actions. Tasks such as zooming, scrolling, and shortcuts are thus disabled. However, it can be advantageous to enable these functions for certain games. You can do this by calling Browser.setDefaultEnabled(WiiRemote.BUTTON_<name>) or by calling one of the convenience methods.

Note that all of the features provided by this class only operate on the Nintendo Wii. If the movie is running on any other system, any calls to these functions will be ignored.

Method Index

disableScrolling(), disableZooming(), enableScrolling(), enableZooming(), isDefaultEnabled(), setBackgroundColor(), setDefaultEnabled()

Method Detail

isDefaultEnabled

static public function isDefaultEnabled(buttonCode:Number):Boolean

This function can tell you if the default action for a particular Wii Remote button is enabled or disabled.

Parameters

buttonCodeOne of the WiiRemote.BUTTON_<name> constants.

Return

True if the default action is enabled, false otherwise.

setDefaultEnabled

static public function setDefaultEnabled(buttonCode:Number, enabled:Boolean)

This function allows you to enable/disable the default action for a given Wii Remote button.

Parameters

buttonCodeOne of the WiiRemote.BUTTON_<name> constants.

enableZooming

static public function enableZooming():Void

A convenience method that enables all Wii Remote buttons related to zooming. This includes the +/- buttons. This is the same as calling setDefaultEnabled with true for each of the following buttons:

  • BUTTON_PLUS
  • BUTTON_MINUS

disableZooming

static public function disableZooming():Void

A convenience method that disables all Wii Remote buttons related to zooming. This includes the +/- buttons. This is the same as calling setDefaultEnabled with false for each of the following buttons:

  • BUTTON_PLUS
  • BUTTON_MINUS

enableScrolling

static public function enableScrolling():Void

A convenience method that enables all Wii Remote buttons related to scrolling. This includes the DPad and the B button. This is the same as calling setDefaultEnabled with true for each of the following buttons:

  • BUTTON_LEFT
  • BUTTON_RIGHT
  • BUTTON_UP
  • BUTTON_DOWN
  • BUTTON_B
Note that this function enables the B button. While this button is enabled, the user is able to use a variety of button shortcuts such as Reload, Back, Favorites, and Enter Web Address. If your game will have users pressing DPad buttons or the +/- buttons in combination with the B button, you should consider disabling the B button.

disableScrolling

static public function disableScrolling():Void

A convenience method that disables all Wii Remote buttons related to scrolling. This includes the DPad and the B button. This is the same as calling setDefaultEnabled with false for each of the following buttons:

  • BUTTON_LEFT
  • BUTTON_RIGHT
  • BUTTON_UP
  • BUTTON_DOWN
  • BUTTON_B

setBackgroundColor

static public function setBackgroundColor(color:Number):Void

Changes the background color of the webpage. This is useful in getting the webpage to match the background color of your movie.

Colors should be passed in an 888 RGB format. For example, Browser.setBackgroundColor(0xFF0000) will set the background to red, while Browser.setBackgroundColor(0x000000) will set the background to black.

Parameters

colorA color in RGB integer format.