Hello :)

1 - create a class who extends MovieClip

class MyClass extends MovieClip
{
    // your code
}

2 - use __proto__ reference :

var mc:MovieClip = createEmptyMovieClip("myClip", 1) ;

mc.__proto__ = MyClass.prototype ; // change the prototype reference
MyClass.call(mc) ; // launch the constructor

EKA+ :)



2006/10/30, Michael Bedar <[EMAIL PROTECTED]>:

I forget who posted this originally, but here's how to create a class
that extends MovieClip without a symbol in the library.

Then you can use attachMovie to create an instance.

> class net.something.MyButton extends MovieClip
> {
>     public static var symbolName:String
> ="__Packages.net.something.MyButton";
>     private static var symbolLinked=Object.registerClass
> (symbolName, MyButton);
>
>     public function MyButton()
>     {
>     }
>
>     // Other implementation goes here...
> }



On Oct 30, 2006, at 12:41 PM, [EMAIL PROTECTED] wrote:

>
> Hi
> I have a pretty basic question concerning registering Movieclips
> that are created dynamically.
>
> //CODE START
> import com.mydomain.util.MyClass;
> var holder=this.createEmptyMovieClip
> ("_mcRef"+_xPos,this.getNextHighestDepth());
> //CODE END
>
> How do I register 'holder' with MyClass?
>
> Thanks in advance
> Jim Bachalo
>
>
> [e] jbach at bitstream.ca
> [c] 416.668.0034
> [w] www.bitstream.ca
> --------------------------------------------
> "...all improvisation is life in search of a style."
>              - Bruce Mau,'LifeStyle'
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> 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

_______________________________________________
Flashcoders@chattyfig.figleaf.com
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

_______________________________________________
Flashcoders@chattyfig.figleaf.com
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