Introduction

Flash is a lightweight cross-platform runtime for rich media, enterprise applications and mobile applications, as well as an integrated development environment. Flash can be programmed in ActionScript 1/2/3.

Friday, November 28th, 2003 at 5:08 pm

A Few Assets

The following classes are a few basics the drawingAPI uses. They must all be in a folder named asset.

The Point-Class:

class asset.Point{
        public var x:Number = null;
        public var y:Number = null;

        public function Point(aXPosition:Number, aYPosition:Number){
                setPosition(aXPosition, aYPosition);
        }
        public function setPosition(aXPosition:Number, aYPosition:Number):Void{
                x = aXPosition;
                y = aYPosition;
        }
        public function moveBy(aX:Number, aY:Number):Void{
                x += aX;
                y += aY;
        }
}

The Size-Class:

class asset.Size{
        public var width:Number = null;
        public var height:Number = null;

        public function Size(aWidth:Number, aHeight:Number){
                width = aWidth;
                height = aHeight;
        }
}

The ShapeProperties-Class:

class asset.ShapeProperties{
        public var border:Boolean = null;
        public var fill:Boolean = null;

        public function ShapeProperties(a:Boolean, b:Boolean){
                border = a;
                fill = b;
        }
}