Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flash Class Arcitecture

Status
Not open for further replies.

LiquidPixel

Programmer
Dec 12, 2006
11
US
Greetings,

I am trying to gain a broader understanding of the Flash class architecture by compiling a map of sorts. My question is where is the functionality of the class taking place. When I open a class from the Flash directory I get something like:

//****************************************************************************
// ActionScript Standard Library
// Mouse object
//****************************************************************************

intrinsic class Mouse
{
static function addListener(listener:Object):Void;
static function hide():Number;
static function removeListener(listener:Object):Boolean;
static function show():Number;
}


Basically definitions. Where are the bells and whistles for these methods. They have to DO something.

Any Help will be appreciated

Regards
P
 
Note the "intrinsic" statement in this class file. "intrinsic" statement is used for compile-time type checking of previously defined classes. In this case the top-level class "Mouse" is defined internally (built-in) in Flash, and this external Mouse class is used to check the type assignment only. This is not a class definition file at all.

If you type in:
[tt]
var s:String = Mouse.hide();
[/tt]
Flash gives you an error saying "Type mismatch in assignment statement: found Number where String is required." This is because "hide()" is defined as "Number" in the Mouse intrinsic statement.

This is my understanding anyway.

Kenneth Kawamoto
 
How then would someone (a developer) create custom class and still have access too it. I understand this question is ridiculous but the functionality has to be somewhere. I see the same intrinsic type when I retro some custom class ASI files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top