20
Apr
08

Property Practice (simple motion)

Having a good grasp of the basic properties of display objects is extremely important for anyone interested in intermediate level ActionScript. This post assumes that you've taken the time to read through Chapter 3. If you're new to ActionScript, it will likely help with this post if you read up to Chapter 7.

This post contains a few short exercises that will put your knowledge of properties to the test.

As a guide, here are the properties that you will need to be familiar with:

x
y
scaleX
scaleY
height
width
rotation

For each example you'll need to use the properties in conjunction with an enterFrame event:

addEventListener(Event.ENTER_FRAME, onLoop, false, 0, true);

function onLoop(evt:Event):void {
  // change properties over time
}

Exercises

To prepare for the exercises, watch each of the following demos as many times as needed using the "Show Example" button, and think about how you would accomplish the same task with ActionScript 3.0. Once you've viewed each example, attempt to recreate it using your current knowledge. Your solutions need not include buttons that control the final animation. The focus here is on problem solving and manipulating properties using the enterFrame event. For example, for the first demo you need only create something that looks like this.

You can download the answers to these exercises at the end of the post, but try to recreate them on your own, first.

Let's get started with Exercise 1:

This movie requires Flash Player 9. Please update your player.

Exercise 2:

This movie requires Flash Player 9. Please update your player.

Exercise 3:

This movie requires Flash Player 9. Please update your player.

Exercise 4:

This movie requires Flash Player 9. Please update your player.

Download Answers

It's important to note that your answers may differ slightly from the solutions included in the below zip. You may have chosen to move a clip at a different speed or you may have used different graphics. It's only important that you were able to recreate the fundamental aspects of each exercise.

Download: Property Practice (simple motion) Answers  Download Property Practice (simple motion) Answers (24 KB, 409 hits)

Share This:
  • Digg
  • del.icio.us
  • Netvouz
  • DZone
  • ThisNext
  • MisterWong
  • Wists
  • blogmarks
  • BlogMemes
  • Fark
  • feedmelinks
  • Furl
  • Ma.gnolia
  • Netscape
  • Reddit
  • Slashdot
  • SphereIt
  • Spurl
  • StumbleUpon
  • Technorati
  • YahooMyWeb
  • BlinkList
  • DotNetKicks
  • LinkaGoGo
  • NewsVine
  • blinkbits
  • co.mments
  • MyShare
Print This Post Print This Post


3 Responses to “Property Practice (simple motion)”


  1. 1 Antonio Apr 20th, 2008 at 3:11 am

    Congratulations, very good exercises, so easy to understand.

  2. 2 Dennis May 8th, 2008 at 1:21 pm

    Great book.
    I struggle to learn AS to update my small print shop's online design element.
    Your book may put that goal in reach.
    Can you advise me on how to make an input text box drag-drop as well as scaleable by handles or font size adjustable but only for the text box that has been selected?
    That element, although common to large sites, is nowhere to be found.

    Thank you

  3. 3 Francisco S. May 29th, 2008 at 11:22 pm

    This is awesome, Thanks Sooo Much!!!

Leave a Reply