Wednesday 21 October 2009

Masking and Interactive Buttons



A really simple star mask I did to practise masking in class... I made it by creating two layers, the bottom layer containing the image and the top layer containing the motion-tweened star. I then selected the 'Mask' option in the top layer's Layer Properties to convert it into a mask layer. I selected the 'Masked' option for the bottom layer.



A week later we were taught how to make interative buttons, using the the previous masking experiment as an example. I didn't have the previous file with me at the time, so I quickly made a new mask using the same theory but with a different image. To create the button, I went to Insert > New Symbol, then chose the behaviour as a 'button'. I used the PolyStar tool to make the triangle 'Play' button, then changed the colour for each of the Up, Over, and Down states. In the Hit state I made a rectangle over the button to define the active area. I then dragged the button onto a separate layer in the scene.

Next I selected the button and opened the Actions window, then chose "On release", and "gotoAndPlay (1)" to make the mask play when the button is clicked. Finally I selected the final frame in the mask layer and added the "Stop" action in Timeline Control to make the movie stop at the end rather than loop back and repeat. This is my first time using any sort of Actionscript, so as simple as this is, I still found it rather confusing at first. But now I think I've got my head around it, and I look forward to learning more types of actions and implementing them in my own cycle animation.

No comments:

Post a Comment