Flash Classes: Let it snow, the Flash way

The article is about the Snow class that is available together with this document and can also be downloaded from http://www.flzone.com/go?9496. The article will explain the functionality of the Snow class and can be used as an introduction to classes and strict data typing in ActionScript 2.0.

Why make a class for the snow effect? It can be easily reused and is fully customizable. You can set the number of snowflakes you want on the screen, the speed the snow falls down the screen and even the wind speed that affects the snow. This and many more options are possible with the Snow class and make it a reusable code that can be applied in many ways.

$2.89
- OR -

Overview

ActionScript 2.0

With Macromedia Flash MX 2004 and MX Professional 2004 came ActionScript 2.0. You have several new features that can be found in other programming languages, such as Java. You can finally program in a way it is meant to be. The new ActionScript 2.0 lets you create reusable, scalable, robust, and maintainable code. It also gives you more coding assistance and debugging information.

Object-Oriented Programming (OOP) model

The most important new feature of ActionScript 2.0 is the implementation of several object-oriented concepts and keywords such as class, interface and packages that are familiar to you if you used other an object-oriented programming language. You can create custom classes and extend the build-in classes.

Strict data typing

ActionScript 2.0 lets you specify data types for variables, function parameters and function return types. Strict data typing offers several benefits at compile time because it triggers compiler errors, helps you find bugs in your code and prevent you from assigning the wrong type of data to a declared variable. During authoring code hinting is activated in the ActionScript editor for the declared variables. By specifying data types to variables it can increase the performance at runtime.

Patrick Woldberg

Patrick WoldbergWorking as a developer creating Dreamweaver extensions and designing/programming for the community sites.

See All Postings From Patrick Woldberg >>

Reviews

Be the first to write a review

You must me logged in to write a review.