Packagejp.nium.external
Classpublic final class BrowserInterface
InheritanceBrowserInterface Inheritance Object

BrowserInterface クラスは、SWF ファイルを再生中のブラウザと、JavaScript を使用して通信を行うクラスです。 BrowserInterface クラスを直接インスタンス化することはできません。 new BrowserInterface() コンストラクタを呼び出すと、ArgumentError 例外がスローされます。 The BrowserInterface class communicates with the browser which are playing the SWF file, using JavaScript. BrowserInterface class can not instanciate directly. When call the new BrowserInterface() constructor, the ArgumentError exception will be thrown.

View the examples



Public Properties
 PropertyDefined By
  appCodeName : String
[static] [read-only] SWF ファイルを再生中のブラウザのコード名を取得します。 Returns the code name of the browser which playing the SWF file.
BrowserInterface
  appName : String
[static] [read-only] SWF ファイルを再生中のブラウザからアプリケーション名を取得します。 Get the application name from the browser which playing the SWF file.
BrowserInterface
  appVersion : String
[static] [read-only] SWF ファイルを再生中のブラウザからバージョンと機種名を取得します。 Get the version and machine name from the browser which playing the SWF file.
BrowserInterface
  enabled : Boolean
[static] [read-only] Flash IDE との JSFL 通信が可能かどうかを取得します。 Returns if it is able to communicate with Flash IDE via JSFL.
BrowserInterface
  locationHref : String
[static] [read-only] SWF ファイルを再生中のブラウザから URL を取得します。 Get the URL from the browser which playing the SWF file.
BrowserInterface
  platform : String
[static] [read-only] SWF ファイルを再生中のブラウザからプラットフォーム名を取得します。 Get the platform name from the browser which playing the SWF file.
BrowserInterface
  userAgent : String
[static] [read-only] SWF ファイルを再生中のブラウザからエージェント名を取得します。 Get the agent name from the browser which playing the SWF file.
BrowserInterface
Public Methods
 MethodDefined By
  
addCallback(funcName:String, closure:Function):void
[static] ActionScript メソッドをコンテナから呼び出し可能なものとして登録します。 Register the ActionScript method as callable from the container.
BrowserInterface
  
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[static] イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーを removeEventListener() メソッドで削除した場合には、restoreRemovedListeners() メソッドで再登録させることができます。 Register the event listener object into the EventIntegrator instance to get the event notification.
BrowserInterface
  
addExclusivelyEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
[static] イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーは、IEventIntegrator インスタンスの管理外となるため、removeEventListener() メソッドで削除した場合にも、restoreRemovedListeners() メソッドで再登録させることができません。 Register the event listener object into the EventIntegrator instance to get the event notification.
BrowserInterface
  
alert(... messages):void
[static] JavaScript を使用したアラートを表示します。 Displays the alert using JavaScript.
BrowserInterface
  
call(funcName:String, ... args):*
[static] Flash Player コンテナで公開されている関数を呼び出し、必要に応じてパラメータを渡します。 Call the function which the Flash Player container opens and pass the parameter if needed.
BrowserInterface
  
completelyRemoveEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[static] EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができません。 Remove the listener from EventIntegrator instance.
BrowserInterface
  
confirm(... messages):Boolean
[static] JavaScript を使用した問い合わせダイアログを表示します。 Displays the inquiry dialog using JavaScript.
BrowserInterface
  
dispatchEvent(event:Event):Boolean
[static] イベントをイベントフローに送出します。 Dispatches an event into the event flow.
BrowserInterface
  
hasEventListener(type:String):Boolean
[static] EventIntegrator インスタンスに、特定のイベントタイプに対して登録されたリスナーがあるかどうかを確認します。 Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
BrowserInterface
  
print():void
[static] ブラウザの印刷ダイアログを表示します。 Displays the print dialog of the browser.
BrowserInterface
  
reload():void
[static] ブラウザを再読み込みします。 Reload the browser.
BrowserInterface
  
removeAllListeners(completely:Boolean = false):void
[static] addEventListener() メソッド経由で登録された全てのイベントリスナー登録を削除します。 完全に登録を削除しなかった場合には、削除されたイベントリスナーを restoreRemovedListeners() メソッドで復帰させることができます。 Remove the whole event listener registered via addEventListener() method.
BrowserInterface
  
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
[static] EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができます。 Remove the listener from EventIntegrator instance.
BrowserInterface
  
[static] removeEventListener() メソッド、または removeAllListeners() メソッド経由で削除された全てイベントリスナーを再登録します。 Re-register the whole event listener removed via removeEventListener() or removeAllListeners() method.
BrowserInterface
  
willTrigger(type:String):Boolean
[static] 指定されたイベントタイプについて、この EventIntegrator インスタンスまたはその祖先にイベントリスナーが登録されているかどうかを確認します。 Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
BrowserInterface
Property Detail
appCodeNameproperty
appCodeName:String  [read-only]

SWF ファイルを再生中のブラウザのコード名を取得します。 Returns the code name of the browser which playing the SWF file.


Implementation
    public static function get appCodeName():String
appNameproperty 
appName:String  [read-only]

SWF ファイルを再生中のブラウザからアプリケーション名を取得します。 Get the application name from the browser which playing the SWF file.


Implementation
    public static function get appName():String
appVersionproperty 
appVersion:String  [read-only]

SWF ファイルを再生中のブラウザからバージョンと機種名を取得します。 Get the version and machine name from the browser which playing the SWF file.


Implementation
    public static function get appVersion():String
enabledproperty 
enabled:Boolean  [read-only]

Flash IDE との JSFL 通信が可能かどうかを取得します。 Returns if it is able to communicate with Flash IDE via JSFL.


Implementation
    public static function get enabled():Boolean
locationHrefproperty 
locationHref:String  [read-only]

SWF ファイルを再生中のブラウザから URL を取得します。 Get the URL from the browser which playing the SWF file.


Implementation
    public static function get locationHref():String
platformproperty 
platform:String  [read-only]

SWF ファイルを再生中のブラウザからプラットフォーム名を取得します。 Get the platform name from the browser which playing the SWF file.


Implementation
    public static function get platform():String
userAgentproperty 
userAgent:String  [read-only]

SWF ファイルを再生中のブラウザからエージェント名を取得します。 Get the agent name from the browser which playing the SWF file.


Implementation
    public static function get userAgent():String
Method Detail
addCallback()method
public static function addCallback(funcName:String, closure:Function):void

ActionScript メソッドをコンテナから呼び出し可能なものとして登録します。 Register the ActionScript method as callable from the container.

Parameters

funcName:Stringコンテナが関数を呼び出すことができる名前です。 The name that the container can function call.
 
closure:Function呼び出す関数閉包です。これは独立した関数にすることも、オブジェクトインスタンスのメソッドを参照するメソッド閉包とすることもできます。メソッド閉包を渡すことで、特定のオブジェクトインスタンスのメソッドでコールバックを実際にダイレクトできます。 The function closure to call. This can be an independent function or method closure which refer the method of the object instance. By passing the method closure, it is actually able to direct the callback by method of the perticular object instance.

addEventListener()method 
public static function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーを removeEventListener() メソッドで削除した場合には、restoreRemovedListeners() メソッドで再登録させることができます。 Register the event listener object into the EventIntegrator instance to get the event notification. If the registered listener by this method removed by using removeEventListener() method, it can re-register using restoreRemovedListeners() method.

Parameters

type:Stringイベントのタイプです。 The type of event.
 
listener:Functionイベントを処理するリスナー関数です。この関数は Event インスタンスを唯一のパラメータとして受け取り、何も返さないものである必要があります。関数は任意の名前を持つことができます。 The listener function that processes the event. This function must accept an Event object as its only parameter and must return nothing. The function can have any name.
 
useCapture:Boolean (default = false)リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階で動作するかどうかを判断します。useCapture を true に設定すると、リスナーはキャプチャ段階のみでイベントを処理し、ターゲット段階またはバブリング段階では処理しません。useCapture を false に設定すると、リスナーはターゲット段階またはバブリング段階のみでイベントを処理します。3 つの段階すべてでイベントを受け取るには、addEventListener を 2 回呼び出します。useCapture を true に設定して 1 度呼び出し、useCapture を false に設定してもう一度呼び出します。 Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener twice, once with useCapture set to true, then again with useCapture set to false.
 
priority:int (default = 0)イベントリスナーの優先度レベルです。優先度は、符号付き 32 ビット整数で指定します。数値が大きくなるほど優先度が高くなります。優先度が n のすべてのリスナーは、優先度が n -1 のリスナーよりも前に処理されます。複数のリスナーに対して同じ優先度が設定されている場合、それらは追加された順番に処理されます。デフォルトの優先度は 0 です。 The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.
 
useWeakReference:Boolean (default = false)リスナーへの参照が強参照と弱参照のいずれであるかを判断します。デフォルトである強参照の場合は、リスナーのガベージコレクションが回避されます。弱参照では回避されません。 Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not.

addExclusivelyEventListener()method 
public static function addExclusivelyEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void

イベントリスナーオブジェクトを EventIntegrator インスタンスに登録し、リスナーがイベントの通知を受け取るようにします。 このメソッドを使用して登録されたリスナーは、IEventIntegrator インスタンスの管理外となるため、removeEventListener() メソッドで削除した場合にも、restoreRemovedListeners() メソッドで再登録させることができません。 Register the event listener object into the EventIntegrator instance to get the event notification. The listener registered by this method can not re-registered by using restoreRemovedListeners() method in case it is removed by using removeEventListener() method, because it is not managed by IEventIntegrator instance

Parameters

type:Stringイベントのタイプです。 The type of event.
 
listener:Functionイベントを処理するリスナー関数です。この関数は Event インスタンスを唯一のパラメータとして受け取り、何も返さないものである必要があります。関数は任意の名前を持つことができます。 The listener function that processes the event. This function must accept an Event object as its only parameter and must return nothing. The function can have any name.
 
useCapture:Boolean (default = false)リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階で動作するかどうかを判断します。useCapture を true に設定すると、リスナーはキャプチャ段階のみでイベントを処理し、ターゲット段階またはバブリング段階では処理しません。useCapture を false に設定すると、リスナーはターゲット段階またはバブリング段階のみでイベントを処理します。3 つの段階すべてでイベントを受け取るには、addEventListener を 2 回呼び出します。useCapture を true に設定して 1 度呼び出し、useCapture を false に設定してもう一度呼び出します。 Determines whether the listener works in the capture phase or the target and bubbling phases. If useCapture is set to true, the listener processes the event only during the capture phase and not in the target or bubbling phase. If useCapture is false, the listener processes the event only during the target or bubbling phase. To listen for the event in all three phases, call addEventListener twice, once with useCapture set to true, then again with useCapture set to false.
 
priority:int (default = 0)イベントリスナーの優先度レベルです。優先度は、符号付き 32 ビット整数で指定します。数値が大きくなるほど優先度が高くなります。優先度が n のすべてのリスナーは、優先度が n -1 のリスナーよりも前に処理されます。複数のリスナーに対して同じ優先度が設定されている場合、それらは追加された順番に処理されます。デフォルトの優先度は 0 です。 The priority level of the event listener. The priority is designated by a signed 32-bit integer. The higher the number, the higher the priority. All listeners with priority n are processed before listeners of priority n-1. If two or more listeners share the same priority, they are processed in the order in which they were added. The default priority is 0.
 
useWeakReference:Boolean (default = false)リスナーへの参照が強参照と弱参照のいずれであるかを判断します。デフォルトである強参照の場合は、リスナーのガベージコレクションが回避されます。弱参照では回避されません。 Determines whether the reference to the listener is strong or weak. A strong reference (the default) prevents your listener from being garbage-collected. A weak reference does not.

alert()method 
public static function alert(... messages):void

JavaScript を使用したアラートを表示します。 Displays the alert using JavaScript.

Parameters

... messages出力したいストリングです。 The strings to display.

call()method 
public static function call(funcName:String, ... args):*

Flash Player コンテナで公開されている関数を呼び出し、必要に応じてパラメータを渡します。 Call the function which the Flash Player container opens and pass the parameter if needed.

Parameters

funcName:String実行したい関数名です。 The name of the function to execute.
 
... args引数に指定したい配列です。 The array to specify as argument.

Returns
*関数の戻り値を返します。 The return value of the function.
completelyRemoveEventListener()method 
public static function completelyRemoveEventListener(type:String, listener:Function, useCapture:Boolean = false):void

EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができません。 Remove the listener from EventIntegrator instance. The listener removed by using this method can not re-register by restoreRemovedListeners() method.

Parameters

type:Stringイベントのタイプです。 The type of event.
 
listener:Function削除するリスナーオブジェクトです。 The listener object to remove.
 
useCapture:Boolean (default = false)リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階に対して登録されたかどうかを示します。リスナーがキャプチャ段階だけでなくターゲット段階とバブリング段階にも登録されている場合は、removeEventListener() を 2 回呼び出して両方のリスナーを削除する必要があります。1 回は useCapture() を true に設定し、もう 1 回は useCapture() を false に設定する必要があります。 Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener() are required to remove both, one call with useCapture() set to true, and another call with useCapture() set to false.

confirm()method 
public static function confirm(... messages):Boolean

JavaScript を使用した問い合わせダイアログを表示します。 Displays the inquiry dialog using JavaScript.

Parameters

... messages出力したいストリングです。 The strings to display.

Returns
Booleanユーザーが [OK] をクリックしたときは true、[キャンセル] をクリックしたときは false を返します。 Returns true when the user clicked "OK" and false when clicked "Cancel".
dispatchEvent()method 
public static function dispatchEvent(event:Event):Boolean

イベントをイベントフローに送出します。 Dispatches an event into the event flow.

Parameters

event:Eventイベントフローに送出されるイベントオブジェクトです。イベントが再度送出されると、イベントのクローンが自動的に作成されます。イベントが送出された後にそのイベントの target プロパティは変更できないため、再送出処理のためにはイベントの新しいコピーを作成する必要があります。 The Event object that is dispatched into the event flow. If the event is being redispatched, a clone of the event is created automatically. After an event is dispatched, its target property cannot be changed, so you must create a new copy of the event for redispatching to work.

Returns
Boolean値が true の場合、イベントは正常に送出されました。値が false の場合、イベントの送出に失敗したか、イベントで preventDefault() が呼び出されたことを示しています。 A value of true if the event was successfully dispatched. A value of false indicates failure or that preventDefault() was called on the event.
hasEventListener()method 
public static function hasEventListener(type:String):Boolean

EventIntegrator インスタンスに、特定のイベントタイプに対して登録されたリスナーがあるかどうかを確認します。 Checks whether the EventDispatcher object has any listeners registered for a specific type of event.

Parameters

type:Stringイベントのタイプです。 The type of event.

Returns
Boolean指定したタイプのリスナーが登録されている場合は true に、それ以外の場合は false になります。 A value of true if a listener of the specified type is registered; false otherwise.
print()method 
public static function print():void

ブラウザの印刷ダイアログを表示します。 Displays the print dialog of the browser.

reload()method 
public static function reload():void

ブラウザを再読み込みします。 Reload the browser.

removeAllListeners()method 
public static function removeAllListeners(completely:Boolean = false):void

addEventListener() メソッド経由で登録された全てのイベントリスナー登録を削除します。 完全に登録を削除しなかった場合には、削除されたイベントリスナーを restoreRemovedListeners() メソッドで復帰させることができます。 Remove the whole event listener registered via addEventListener() method. If do not remove completely, removed event listener can restore by restoreRemovedListeners() method.

Parameters

completely:Boolean (default = false)情報を完全に削除するかどうかです。 If it removes the information completely.

removeEventListener()method 
public static function removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void

EventIntegrator インスタンスからリスナーを削除します。 このメソッドを使用して削除されたリスナーは、restoreRemovedListeners() メソッドで再登録させることができます。 Remove the listener from EventIntegrator instance. The listener removed by using this method can re-register by restoreRemovedListeners() method.

Parameters

type:Stringイベントのタイプです。 The type of event.
 
listener:Function削除するリスナーオブジェクトです。 The listener object to remove.
 
useCapture:Boolean (default = false)リスナーが、キャプチャ段階、またはターゲットおよびバブリング段階に対して登録されたかどうかを示します。リスナーがキャプチャ段階だけでなくターゲット段階とバブリング段階にも登録されている場合は、removeEventListener() を 2 回呼び出して両方のリスナーを削除する必要があります。1 回は useCapture() を true に設定し、もう 1 回は useCapture() を false に設定する必要があります。 Specifies whether the listener was registered for the capture phase or the target and bubbling phases. If the listener was registered for both the capture phase and the target and bubbling phases, two calls to removeEventListener() are required to remove both, one call with useCapture() set to true, and another call with useCapture() set to false.

restoreRemovedListeners()method 
public static function restoreRemovedListeners():void

removeEventListener() メソッド、または removeAllListeners() メソッド経由で削除された全てイベントリスナーを再登録します。 Re-register the whole event listener removed via removeEventListener() or removeAllListeners() method.

willTrigger()method 
public static function willTrigger(type:String):Boolean

指定されたイベントタイプについて、この EventIntegrator インスタンスまたはその祖先にイベントリスナーが登録されているかどうかを確認します。 Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.

Parameters

type:Stringイベントのタイプです。 The type of event.

Returns
Boolean指定したタイプのリスナーがトリガされた場合は true に、それ以外の場合は false になります。 A value of true if a listener of the specified type will be triggered; false otherwise.
Examples