Home | Help Forums | Web Design Tutorials | Free Swishmax Downloads | All Downloads

 

 

Company

Home

Nework Details

Tutorials

SWiSH 2

SWiSHMax

Flash MX

PHP & MySQL

HTML / JScript

Adobe Photoshop

Corel Draw

Gimp

Miscellaneous

Downloads

Templates

Plugins

Fonts

Wallpapers

Free Images

Scripts and Codes

Products

E-Books

SWiSH BB

SWiSH Templates

SWiSH-DB Newsletter
Subscribe to our newsletter : GO
  Partners / Affiliates

   Swish Templates
   SWiSH Climax
   GimpTalk
   Idea Designs
   Sposatoettore
   Try Acai Berry Diet
   Download Free Ringtones
   Swishzone

Manage your site with Flax Article Content Management System
Understanding Object Properties
Category : SWiSHMax | Level : Intermediate | Language : English
Ask Question | Read Comments | Post tutorial | Previous | Next

Web www.swish-db.com

What are object properties.
Everything you design in SWISH MAX 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
  • _X     =  for X-axis of an object
  • _Y     =  for Y-axis of an object
  • _xscale     =  for strecthing abject on x-axis   <--->
  • _yscale     =  for strecthing abject on y-axis (top to bottom)
  • _alpha     =  for objects alpha value (transparency)
  • _rotation     =  rotating object on x-axis
  • _visible     =  this is a boolean expression (true or false)
  • _height     =  height of an object
  • _width     =  width of an object
  • _name     =  return name an object

DESCRIPTION
-------------------
Assigning Values to Object Properties
NOTE : when you make an object dont forget to give object name and CHECK the button target.

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.

regards
- Ali Roman..


All rights reserved - swish-db.com