ヘルプ日本語訳/Understanding the actions

Last-modified: 2010-12-24 (金) 17:24:03

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

 

アクションを理解する

アクションはアプリケーション内で条件が満たされた時に引き起こされます。特定の条件が満たされたら、その条件に割り当てられたアクションが実行されます。
Multimedia Fusion 2 Developer が条件を満たしたときに実行できる独自のアクションを、各々のオブジェクトは持っています。例をあげると、

  • プレイヤーオブジェクトでライフ、スコアを増やしたり減らしたりできます。
  • ストーリーボードコントロールオブジェクトで、次のフレームに移動したり、前のフレームに移動したり、現在のフレームをリスタートしたり、アプリケーションを終了したりできます。
  • アクティブオブジェクトを動かしたり、アニメーションを操作したり、破壊したりできます。

オブジェクトのアクションにはイベントエディタからアクセスできます。イベントエディタの上部に並んでいるのは、アクションが利用可能なオブジェクトのアイコンです。これらのアイコンはアプリケーションに含まれているオブジェクトに応じて変わってきます。アイコンの下のグリッドを右クリックし、ポップアップメニューからアクションを選ぶことでアクションを入力できます。

 

イベント内でのアクションの順番
イベントの条件が真になったとき実行されるアクションの順番は、アクションがイベントに追加された順番で決定します。アクションの順番は時にとても重要になります。例えば、あるイベントに、カウンターをインクリメントする、カウンターの値に対応するリストの要素を選択する、という二つのアクションがある場合、順番が重要になります。上記の順番で、カウンターの現在の値が1で、値を1増やした場合、リストの2番目の要素が選択されます。しかし、アクションの順番を逆にした場合、リストの1番目の要素が選択されます。

 

アクションをイベントに入力したあとに順番を変更するには、イベントの番号を右クリックしアクションを編集を選択します。そうすると、選択したイベントのアクションのみを表示したイベントリストエディタが開きます。リスト内でアクションをドラッグアンドドロップすることで、実行する順番を変更できます。

(原文)Understanding actions

Actions occur as a result of the conditions in your applications. Once a particular condition is detected, the associated action(s) take place.
Each object type has its own set of actions that can occur when Multimedia Fusion 2 Developer detects a condition. For example

  • Lives objects can be gained or lost.
  • Score objects can be increased or decreased.
  • Storyboard objects can cause a jump to the next frame, cause a jump to the previous frame, restart -the current frame, and end the application.
  • Active objects can be moved, animated, or destroyed.
  • Netscape objects can launch specific World Wide Web sites.
 

You can access the object actions in the Event editor. Along the top line in the Event editor is a series of object icons representing the available action types. These icons differ depending on which objects you have included in your application. You can enter your actions by right-clicking a grid box under an icon and choosing an action from the pop-up menu.

 

Ordering the actions within an event

 

The order in which actions are added to an event determines the order in which those actions are executed when the condition of that event becomes true. The order of actions can be very important. For example, if your event has two conditions, one to increment a counter and another to select an item from a list which corresponds to the value of the counter, the order is very important. If the counter is currently at 1 and you increment it by 1, your event will select the second item in the list. However, if you perform the actions in the reverse order, the first item in the list is selected.

 

To modify the order of the actions in an event after you’ve entered them, you can right-click the number of the event and select Edit the Actions. This opens the Event List Editor which displays only the actions for the selected event. You can drag and drop the actions in the list to change the order in which they are executed.