|
|||
| week 04b - variables & variable scope, properties, Math.random() | |||
properties : |
manipulating movieClips |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| introduction : | Each instance of a movieclip on the stage has its own features such as scale, location on the stage, and transparency. These features can be read and in most cases changed in ActionScript by addressing the properties of a movieClip instance. These properties are addressed using the dot syntax format of movieClip._property. For example, to change the transparency of a movieclip, the following code would set the current movieClip to be 50% transparent:
Most of the properties in Flash apply to the main timeline as well as movieClip instances. For example, to make a movieClip track the current cursor position so it behaves as a custom cursor, the following code could be put in the movieClip:
Note that if a property is changed using ActionScript, any timeline tweening of the movieClip will cease to operate. In other words, at the time a movieClip property is changed, the link between a timeline and the movieClip is broken.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| the properties : | A list of Flash MX properties is on page 624 of the ActionScript textbook. A complete list of Flash MX properties, with links to explanations of each property is listed in the Flash help system under: HELP>ACTIONSCRIPT DICTIONARY>ACTIONSCRIPT LANGUAGE REFERENCE>M>MOVIECLIP CLASS This list of Flash MX properties is reproduced here with the addition of a column for value ranges. Some of the visual properties are highlighted in blue:
|
| all materials on this web site © copyright 2004, Philip van Allen |
top |