Written by: Jesse Stratford
Difficulty Level: Beginner
Requirements: Flash 4 or higher
Topics Covered: How to use the Set Property action in Flash.
Assumed Knowledge: Instances, Paths

Download the source file for the above movie here. (Zipped, PC, Flash 5 file).

(Those of you who have read the Get Property tutorial might experience a bit of Deja Vu here as I have duplicated many paragraphs since they are relative to Set Property also).

The Set Property function, like its sister Get Property, is vital for any would-be Actionscript user, no matter their level. Mastering this function will broaden your spectrum for interactivity in no time flat!

Let's get going! Let me start by saying the code examples given here are for Flash 5 (and above) but if you can't convert them into Flash 4 code yourself you need help! The only real difference is that Flash 5 (and above) uses 'setProperty' and Flash 4 uses 'Set Property'. *Shock!*

Also note that because this is a beginner level tutorial I am going to start by using the actual setProperty command. We'll get into infix notation later.

All objects in space have attributes or properties: such as width, height, position, color, etc. Flash is no different, all visual elements within your flash movie have properties. Often it is beneficial to us if we can set the values of such properties, and Actionscript allows for this beautifully.

Take the movie clip above as an example. We want to poke and prod Cheesey (my mouse's instance name). Using Set Property we can make him fat/skinny, transparent, upside-down (rotated), invisible and more! Now Cheesey is under our complete control. *Evil laugh*.

Usage of Set Property takes the following basic form:

setProperty ( target, property, value);

Where target is the instance name of the object within the Flash movie which we are interested in examining, property indicates the property we wish to set and value is the value we wish to set it to. The target is generally the path to a movie clip (see the paths tutorial for more on paths). The value is almost always a number, in expression form, not a String. I say again, not a string - don't use quotes around numbers! See the variables tutorial if you don't quite understand the difference.

We'll go into more depth over the page...