logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel
Southwest USA
Irish Culture


dailyclick
All times in EST

Full Schedule
g
g Flash and Animation Site

BellaOnline's Flash and Animation Editor

g

ActionScript 3 and Flash CS3 Professional


With this newest upgrade of FlashR CS3 Professional, the Flash ActionScriptTM scripting language has grown up into a full-fledged programming language. Of course, this is a two-edged sword. With the increase in functionality, ActionScript 3 is now much more complex.

As a programmer at OSU many years ago, I saw many of my coworkers rewrite their programs when a new language became popular. I never agreed with that practice. I never reinvent the wheel unless I absolutely need to. However, I think that when switching to ActionScript 3, you really do need to reinvent the wheel. I'm sure that you can find many quick fixes and work-arounds for patching your ActionScript 2 code to work in ActionScript 3. There are several books published for just that purpose. But, you will probably spend just as much time (or even more time) searching for those fixes and patching them into your programs than you would spend learning ActionScript 3 from the ground up. So here we go.

Most of you already know that ActionScript 3 is an Object-Oriented Programming language. So we will start by discussing some of the OOP basics such as objects, classes and properties while looking at the first line of code for creating a class.

. . .
public class name_of_class {
public var name_of_property . . .
}
. . .

Objects, Classes and Properties

An object is a "thing". It can be a movie clip or a snowflake. In a previous tutorial, we created a snowflake symbol and placed several instances of the symbol on the Flash stage. Each snowflake that we placed on the stage was an instance of the snowflake symbol that we stored in the Flash Library. You can think of an object as an instance of a class. Once you have created a class, you can use as many instances, or objects, of that class as you need. So what is a class?

An OOP class is a grouping of one type of object such as a movie clip. Each movie clip that you use in your Flash movie would be an instance or object of the MovieClip class. Why would you want to group all the movie clips into a class? Well, a class can have properties. A property is a type of variable that holds a piece of information. Any property that you give to your class is "passed down to" each instance of that class. For example, the MovieClip class has properties such as height, width and rotation which you can use to control how the movie clip appears on your stage.




Add ActionScript+3+and+Flash+CS3+Professional to Twitter Add ActionScript+3+and+Flash+CS3+Professional to Facebook Add ActionScript+3+and+Flash+CS3+Professional to MySpace Add ActionScript+3+and+Flash+CS3+Professional to Del.icio.us Digg ActionScript+3+and+Flash+CS3+Professional Add ActionScript+3+and+Flash+CS3+Professional to Yahoo My Web Add ActionScript+3+and+Flash+CS3+Professional to Google Bookmarks Add ActionScript+3+and+Flash+CS3+Professional to Stumbleupon Add ActionScript+3+and+Flash+CS3+Professional to Reddit



 



RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the Flash and Animation Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Diane Cipollo. All rights reserved.
This content was written by Diane Cipollo. If you wish to use this content in any manner, you need written permission. Contact Diane Cipollo for details.

g


g features
Animate Lower Third in Motion 5

Drop Zone and Lower Third in Motion 5

Add Static Text To Craft Product Trailer Template

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor