Web Development Logs
Find articles, news and reviews about latest technologies.


Welcome Guest !
please login or register a new free account.


Home | Archives | Submit Article | Top Rated | Advance Search | Contacts Us | Rss Feeds

    Main Categories
» Free downloads
» General Blog
» Google Adsense
» Scripting languages
» Search Engines
» Web Designing

  More Options
» Most read articles
» Most rated articles

   Subscription
Subscribe now and receive free articles and updates instantly.
» Your name » Your Email

titles description    advance search
Published : April 29, 2006 | Author : Ali Roman
Category : Scripting languages | Total Views : 898 | Unrated

  
What are object properties ?

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
  • _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..




1 2 3 4 5
please rate this article     Poor
Excellent    
Most viewed articles in Scripting languages category

Retrieving data from MySQL database using php
Creating simple contact form using swishmax and php
Creating dynamic combo list with PHP and MySQL
Creating simple percentage preloader with swishmax
Saving data to a text file with swishmax and php
Most recent articles in Scripting languages category

Saving data to a text file with swishmax and php
Creating dynamic combo list with PHP and MySQL
Retrieving data from MySQL database using php
Establishing connection with MySQL using php
Creating table using MySQL database

 Visitor's Comments !

there are no comments...


    Random Pick
This tutorial will demonstrate how to send/save data to/in a text file. Before starting this tutorial I will define what is an Input Box and how to use it. Input box is a text field in which you enter your data with the help of keyboard.

    Statistics
» Total Articles
74
» Total Authors
103
» Total Views
123990
» Total categories
6

Delete cookies set by this site | Top   

Article Manager by Flaxweb
Copyright 2006 © Flax Article Manager v1.1