ヘルプ日本語訳/Understanding the functions

Last-modified: 2010-12-24 (金) 17:25:35

ヘルプ日本語訳 > Understanding the events > Understanding the functions

 

関数を理解する

関数を使うとオブジェクトからデータを取得でき、別のオブジェクトに使うことができます。例えば、日付&時間オブジェクトに表示されている日付を取得し、その日付を文字列オブジェクトで表示できます。

 

関数は Multimedia Fusion 2 Developer 数式エディタの「オブジェクトからデータを抽出」ボタンからアクセスできます。各関数は特定の値を数式エディタに表示されている式へ読み出します。Multimedia Fusion 2 Developer が数値や文字列を入力する必要があるときに、数式エディタは表示されます。

 

Multimedia Fusion 2 Developerには二種類の関数、一般関数とオブジェクト関数があります。

 

一般関数
一般関数はイベントエディタからのみアクセスできるシステムオブジェクトからデータを取得します。システムオブジェクトとは、特別、サウンド、ストーリーボードコントロール、タイマー、新規オブジェクトを作成、マウスポインタとキーボード、プレイヤーです。例えば、プレイヤーオブジェクトの関数で、現在のスコアや現在のライフの数を取得できます。他にも一般関数の例として、現在のフレーム番号、フレーム内のオブジェクトの総数、マウスの現在のX座標、現在のタイマーカウントを取得できます。

 

オブジェクト関数
オブジェクト関数はシステムオブジェクト以外のオブジェクトからデータを取得します。利用できる関数は、オブジェクトの型によって決まります。例えば、速度、位置、変数(アクティブオブジェクト)、現在のトラックの番号(CD-オーディオオブジェクト)、現在のURL(Netscapeオブジェクト*1)を取得できます。

(原文)Understanding functions

Functions let you retrieve data from one object for use in another object. For example, you can retrieve the date displayed in the Date & Time object and display it in the String object.

 

Functions can be accessed via the [Retrieve Data From An Object] button in the Multimedia Fusion 2 Developer Expression editor. Each function loads a specific value into the equation displayed in the Expression editor. The Expression editor is displayed whenever Multimedia Fusion 2 Developer requires you to enter a number or text string.

 

There are two types of functions in Multimedia Fusion 2 Developer General, and Object.

 

General Functions

The General functions retrieve data from the Restricted objects that are only accessible in the Event Editor. The Restricted objects are Special, Sound, Storyboard Controls, Timer, Create New Objects, Mouse & Keyboard, and Player. For example, the Player functions let you retrieve the current value of the score and the current number of lives that a player has left. Other examples of General functions include retrieving the current frame number, the total number of objects in the frame, the current horizontal (X) position of the mouse, and the current timer count.

 

Object Functions

The Object functions retrieve data from objects other than the Restricted objects. The functions available depend on the type of object. For example, you can retrieve the speed, position, and alterable values of an Active object, the current track number of a CD-Audio object, and the current URL of a Netscape object.


*1 NetscapeオブジェクトはMMF2には付属していません。