|
| You are here: Categories » Computers and technology » Flash
|
A property like _x and _y is the movie clip property _rotation.
The _rotation property accepts a value in degrees. A circle is divided into 360 degrees. The values used by _rotation range from -180 to 180. You can use integers or floating point values.
The value of _rotation always stays between -180 and 180, no matter what you set it to. For instance, if you set it to 179, it stays 179. However, if you set it to 181, it wraps around to -179.
To change this property, simply set it to a value. You can also use operators such as ++ and += to change the value. Here are some examples:
myClip._rotation = 90;
myClip._rotation++;
_root["myClip"]._rotation = 45;
this._rotation += 0.5; |
|
Leave a comment or ask a question
|
|
Total comments: 0
Disclaimer
- The e-articles directory is not responsible for any and all copyright infringements by writers and authors. If you suspect the information contained by this page for any copyright infringements, please contact us to investigate the issue
|
|
|
Enhancing Standalone Projector - You want to create an enhanced Standalone Projector with features such as borderless playback, custom titles, no Flash menus, and so on. Use a third-party tool such as SWF Studio or SWFKit to c (more...)
Creating Flash Buttons - Buttons are one of the three main types of symbols that you use in Flash. The others are movie clips and graphics.
Making a New Button
There are many ways to create a button. One (more...)
Bouncing Ball Script - Start a new Flash movie. Create a movie clip that has a ball graphic inside it.
You can name the instance of the movie clip, myClip, but our code will not depend on the name of the clip. (more...)
ActionScript: Creating Reusable Code - You want to perform a series of actions at various times without duplicating code unnecessarily throughout your movie.
Create a function and then call (i.e., invoke) it by name whenever you (more...)
3D Scaling with ActionScript - Although Flash is not capable of real 3D graphics, the kind seen in popular computer games, you can create the illusion of 3D by using scaling.
Scaling an object is a great way to give your (more...)
The Dot Syntax - Something else that you will be seeing a lot of as you learn ActionScript is dot syntax. Dot syntax is a way of grouping objects and functions that is used in many object-oriented programming (more...)
Movie Clip Scripts - Movie clip scripts, like button scripts, use handlers. Instead of using the on keyword that button scripts use, we will use the onClipEvent keyword. Here is an example of a movie clip script:
(more...)
Decoding an RGB Value - You want to extract the red, green, and blue components from an RGB value returned by Color.getRGB( ).
Use the bitshift right and bitwise AND operators.
You can extract the red, gre (more...)
Scaling a Flash Movie - You want to control how a movie fits in the Player, including the scaling. Use the Stage.scaleMode property.
The Flash Player defaults to a scale mode of "showAll" (except the tes (more...)
|
|
|