STEP 16 rolloutscript: controlling the DANCER OBJECT

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.

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

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

  3. Select Tell Target from the Add Actions list and enter /dancer as the Target.

  4. Select Stop from the Add Actions list.

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

  6. Select the Else action and make sure that the Elseand not the End Ifoption is selected.

  7. Select Tell Target from the Add Actions list and enter /dancer as the Target.

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

Flash Web Design The Art Of Motion Graphics
Flash Web Design oder: the art of motion graphics
ISBN: 3827256623
EAN: 2147483647
Year: 2005
Pages: 192 © 2008-2017.
If you may any questions please contact us: