Keep pressing each button to see further ketchup transformations.

Director Transforms

Download the sample files

Bring in an image.

Draw some buttons with the button tool, label each one, scale, rotate, move, skew, reset.


Add a behavior to each button:

Choose the scale button on the stage.

dir_behedit.jpg

Open the Window->Inspectors->Behavior Inspector.

Click and hold on the top
+ button to add a new behavior.   dir_behplus.jpg
         Name it   scale

In the Behavior Inspector Window, click the small arrow pointing right to see more options.   dir_r_arrow.jpg 

Click and hold on the second
+  button down  to add the command MouseDown.

Bring up the Window->Script window
   You may need to click the
until you find the scale script you started.

Add the following code to your scale script:


on mouseDown
      sprite(1).height = sprite(1).height + 2
     
sprite(1).width = sprite(1).width + 2
end


What you did:

sprite(1).height = sprite(1).height + 2  , everytime the mouse is clicked down, it adds 2 the exisiting value.  So, the image scales a little bit more everytime you click the mouse.


Try a similar method for the rest of the transformations:
     sprite(1).rotation
     sprite(1).locH
     sprite(1).skew