[haXe] AS2 new MovieClip()

filt3r at free.fr filt3r at free.fr
Sat Apr 28 20:42:49 CEST 2007


Hi again !
Do you know a way to make something like that in haXe flash8 :
I have a custom class MyClass extends MovieClip, and I would to make :
var kiki = new MyClass(...);
kiki._x = 100;
...
Well I dont know if it's clear but I would to use it as in as3, instantate it on
stage and make it displayed automatically, that's why I asked my previous
question in fact.
Thanks


Selon eka <ekameleon at gmail.com>:

> Hello :)
>
> for me .. you must use the __proto__ object
>
> mc.__proto__ = MyClass.prototype ; // change the MovieClip prototype
> reference of your instance with the MyClass prototype
> MyClass.call(mc) ; // launch the constructor if you want initialize your
> instance with this constructor
>
> EKA+ :)
>
> 2007/4/28, filt3r at free.fr <filt3r at free.fr>:
> >
> > Hi all !
> > I'm looking for a trick to instanciate a class which extends MovieClip.
> > I can instanciate it but it doesnt appear on the stage :(
> > There was a trick in AS2:
> >
> >
>
http://www.peterjoel.com/blog/index.php?archive=2004_01_01_archive.xml#107550841406346131
> >
> > Maybe is there another trich in haXe ?
> > Thanks,
> > Michel
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
>





More information about the Haxe mailing list