Articles related to web development
Everything you design in Swishmax is an object, like SPRITE is an object, the TEXT you write is also is TEXT OBJECT. Shapes are Shape Objects. We can easily set/change properties. And assign new values to any object’s properties.
You can create Shape Objects using the following drawing tools:
Line
Pencil
Bezier
Rectangle
Ellipse
AutoShapes.
OBJECT PROPERTIES
It is not much difficult to understand the properties of objects. You can easily assign new values or retrieve the actual values by different methods. Its really easy to assign new values to each property e.g you have a SHAPE Object, and its name is myshape now you will assign values like this
onFrame (1) {
myshape._X=200;
myshape._y=100;
myshape._height=10;
myshape._width=10;
myshape._xscale=200;
myshape._yscale=400;
myshape._alpha=100;
myshape._rotation=0;
myshape._visible=true;
}
In my example I made a rectangle of widht=1 and height=1 and placed it on x=0 and y=0. When I will play my Movie, all the values will be changed automatically. If you will set myshape._visible=false; the object will be hidden.
Retrieving actual property values of Object
This is also not difficult to understand, what you have to do is simply make a variable and assign it the object property variable, for example you want to get the value of Shape object myshape and save it to any other variable newX, then simple do it like this
newX=myshape._X;
now the variable newX contains the value X-axis of myshape object. I thinks now it will be clear to you, what are object properties and how to handle them. It may help the beginners to SWiSHScript.
Leave a reply