Don't know of anything like this available out there, doesn't mean there isn't.
What you saw is part of a larger app that spits out a complete ARP application 
and actually writes .as files to disk (you now saw me 
copy/paisting the code into Flash).

regards,
Muzak

----- Original Message ----- 
From: "Jesse Graupmann" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, June 03, 2007 3:22 AM
Subject: RE: [Flashcoders] AS 2 Delegate question


> Ha! That's rad.
>
> I guess the trick is writing a Flash app to write the bulk of the code...
> Got links to any of those?
>
> ;)
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Muzak
> Sent: Saturday, June 02, 2007 5:54 PM
> To: [email protected]
> Subject: Re: [Flashcoders] AS 2 Delegate question
>
> This isn't about quick and easy, but about encapsulation, OOP and best
> practices.
> Quick and easy also often means quick and dirty ;-)
>
> Here's a stripped down version of a custom button.
>
> import mx.events.EventDispatcher;
> import mx.utils.Delegate;
>
> class com.muzakdeezign.samples.MyButton extends MovieClip {
> // decorate class with EventDispatcher
> private static var dispatcherInit =
> EventDispatcher.initialize(com.muzakdeezign.samples.MyButton.prototype);
>
> // declare EvenDispatcher methods
> public var addEventListener:Function;
> public var removeEventListener:Function;
> public var dispatchEvent:Function;
>
> private var back_mc:MovieClip;
>
> private var __index:Number;
>
> function MyButton() {
>  this.init();
> }
>
> private function init():Void {
>  this.back_mc.onRelease = Delegate.create(this, this.backReleaseHandler);
> }
>
> private function backReleaseHandler():Void {
>  this.dispatchEvent({type:"click"});
> }
>
> private function setIndex():Void {
> }
>
> function get index():Number {
>  return this.__index;
> }
> function set index(val:Number):Void {
>  this.__index = val;
>  this.setIndex();
> }
>
> }
>
> Here's a screencast making the above:
> http://muzakdeezign.com/flashcoders/create_component/MyButton.html
>
> regards,
> Muzak
>
>


_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to