The next part of the script again deals with the /Dancer object. You want the object to be affected in two ways on rollout: First, it should darken a bit and second, it should stop if one condition is met, otherwise play.
-
With the End Tell Target command selected, select Set Property from the Add Actions list and set the Alpha roperty of the target /dancer to a value of 42.
In the previous use of the conditional statement (in the RolloverScript), put an If-Else-End-If clause inside a Tell Target action.
Here, I'll demonstrate another approachwrapping the conditional statement outside the Tell Target actions.
-
Choose If from the Add Actions list and in the Condition field, enter the following line:
dancer_framelabel eq "spin"
The variable dancer_framelabel will be set by the various buttons ; when it is equal to (eq) "spin", the following action takes place.
-
Select Tell Target from the Add Actions list and enter /dancer as the Target.
-
Select Stop from the Add Actions list.
-
Select the If command, then click the Add Else/Else If Clause button.
An Else action is added between the If and End If actions.
-
Select the Else action and make sure that the Elseand not the End Ifoption is selected.
-
Select Tell Target from the Add Actions list and enter /dancer as the Target.
-
Add a Play action below the Begin Tell Target action. See figure 08:29.
Figure 08:29.
The completed RolloutScript will look like this:
Begin Tell Target (whichmovie) Go to and Play (2) End Tell Target Set Property ("/dancer", Alpha) = "42" If (dancer_framelabel eq "spin") Begin Tell Target ("/dancer") Stop End Tell Target Else Begin Tell Target ("/dancer") Play End Tell Target End If