Packagejp.nium.external
Classpublic final class JavaScript

JavaScript クラスは、SWF ファイルを再生中のブラウザと、JavaScript を使用して通信を行うクラスです。 The JavaScript class communicates with the browser which are playing the SWF file, using JavaScript.


Example
  



Public Properties
 PropertyDefined by
  appCodeName : String
[static][read-only] SWF ファイルを再生中のブラウザのコード名を取得します。 Returns the code name of the browser which playing the SWF file.
JavaScript
  appName : String
[static][read-only] SWF ファイルを再生中のブラウザからアプリケーション名を取得します。 Get the application name from the browser which playing the SWF file.
JavaScript
  appVersion : String
[static][read-only] SWF ファイルを再生中のブラウザからバージョンと機種名を取得します。 Get the version and machine name from the browser which playing the SWF file.
JavaScript
  documentTitle : String
[static] SWF ファイルを再生中のブラウザのタイトルを取得または設定します。
JavaScript
  enabled : Boolean
[static][read-only] 再生中のブラウザと JavaScript 通信が可能かどうかを取得します。 Returns if it is able to communicate with Browser via JavaScript.
JavaScript
  locationHref : String
[static] SWF ファイルを再生中のブラウザから URL を取得または設定します。
JavaScript
  platform : String
[static][read-only] SWF ファイルを再生中のブラウザからプラットフォーム名を取得します。 Get the platform name from the browser which playing the SWF file.
JavaScript
  userAgent : String
[static][read-only] SWF ファイルを再生中のブラウザからエージェント名を取得します。 Get the agent name from the browser which playing the SWF file.
JavaScript
Public Methods
 MethodDefined by
  
addCallback(funcName:String, closure:Function):void
[static] ActionScript メソッドをコンテナから呼び出し可能なものとして登録します。 Register the ActionScript method as callable from the container.
JavaScript
  
alert(... messages):void
[static] JavaScript を使用したアラートを表示します。 Displays the alert using JavaScript.
JavaScript
  
call(funcName:String, ... args):*
[static] Flash Player コンテナで公開されている関数を呼び出し、必要に応じてパラメータを渡します。 Call the function which the Flash Player container opens and pass the parameter if needed.
JavaScript
  
confirm(... messages):Boolean
[static] JavaScript を使用した問い合わせダイアログを表示します。 Displays the inquiry dialog using JavaScript.
JavaScript
  
print():void
[static] ブラウザの印刷ダイアログを表示します。 Displays the print dialog of the browser.
JavaScript
  
prompt(... messages):String
[static] JavaScript を使用したプロンプトを表示します。
JavaScript
  
reload(enforce:Boolean = true):void
[static] ブラウザを再読み込みします。 Reload the browser.
JavaScript
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
documentTitleproperty 
documentTitle:String  [read-write]

SWF ファイルを再生中のブラウザのタイトルを取得または設定します。

Implementation
    public static function get documentTitle():String
    public function set documentTitle(value:String):void
enabledproperty 
enabled:Boolean  [read-only]

再生中のブラウザと JavaScript 通信が可能かどうかを取得します。 Returns if it is able to communicate with Browser via JavaScript.

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

SWF ファイルを再生中のブラウザから URL を取得または設定します。

Implementation
    public static function get locationHref():String
    public function set locationHref(value:String):void
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.

Example
   

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

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

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

Example
   

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.

Example
   

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".

Example
   

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

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


Example
   

prompt()method 
public static function prompt(... messages):String

JavaScript を使用したプロンプトを表示します。

Parameters
... messages出力したいストリングです。

Returns
Stringユーザーが入力したストリングです。

Example
   

reload()method 
public static function reload(enforce:Boolean = true):void

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

Parameters
enforce:Boolean (default = true)

Example