Too many possibilities. Are you creating a ValueObject? Extending a
framework's abstract base class? Creating a View?
// plain object
class MyClass
{
function MyClass()
{
}
public function toString():String
{
return "[class MyClass]";
}
}
// extending UIComponent
import mx.core.UIComponent;
class MyComponent extends UIComponent
{
public static var symbolName:String = "MyComponent";
public static var symbolOwner:Object = MyComponent;
public var className:String = "MyComponent";
private var boundingBox_mc:MovieClip;
function MyComponent()
{
}
public function init():Void
{
super.init();
tabEnabled = true;
focusEnabled = true;
tabChildren = false;
boundingBox_mc._visible = false;
boundingBox_mc._width = 0;
boundingBox_mc._height = 0;
}
private function createChildren():Void
{
}
public function draw():Void
{
size();
}
public function size():Void
{
}
public function onLoad():Void
{
}
}
// Extend View for components with "stuff" in them, perfect for forms
import mx.core.View;
class MyView extends View
{
public static var symbolName:String = "MyView";
public static var symbolOwner:Object = MyView;
public var className:String = "MyView";
function MyView()
{
}
public function init():Void
{
super.init();
}
private function initLayout():Void
{
super.initLayout();
}
private function createChildren():Void
{
super.createChildren();
}
private function doLayout():Void
{
super.doLayout();
}
}
----- Original Message -----
From: "Stephen Ford" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, January 09, 2006 10:12 PM
Subject: [Flashcoders] Bonafide AS2.0 class template ...
I am fairly new to AS2.0 and OOP in general and I was wondering if anyone
has a template file for AS2.0 classes that they wouldn't mind sharing.
I am looking for a blank AS2.0 template that contains dummy content and
layout that can be used (and should be used) every time I want to start
creating a new AS2.0 class.
I have seen something like this somewhere but can't see to locate it.
It had everthing in place and even indicated what goes where, when creating
a new class.
Anyone have something like this that could be used as a template for ANY
possibility that might come up when creating an AS2.0 class file ?
Thanks for reading,
Stephen.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders