[haXe] AS2 registerClass MovieClip

filt3r at free.fr filt3r at free.fr
Sun Apr 29 12:00:32 CEST 2007


Hi eka !
Thanks again.
I've heard a little about VEGAS.
Will it be something like pixlib ?
And as2tohaxe is a new thing to be released or what ? will it converts all
correctly ?
Cause I talked with Francis Bourre and he proposed me to write pixlib to haxe (
Eric Priou I think was in this way too) but now .... maybe I'll try to wait this
as2tohaxe.But I think a lot of things must change strongle cause haXe has some
tricks that as2 doesn't have and pixlib for exemple reproduce some of them so it
must disappear in pixlib for haxe ( don't know if it's clear ) :)


Selon eka <ekameleon at gmail.com>:

> Hello :)
>
> you want pass arguments in the constructor ? or with the init object like
> the last argument in the attachMovie method ?
>
> To pass the arguments in the constructor :
>
> MyClass.call(mc, arg1, arg2, arg...., argN ) ;
>
> or
>
> MyClass.apply(mc, [arg1, arg2, arg...., argN] ) ;
>
> if you want initialize the properties :
>
> var init = { _x : 25 , _y : 40 }
>
> for (var prop:String in init )
> {
>      mc[prop] = init[prop] ;
> }
>
> In AS2 i use my personnal class DisplayFactory (in VEGAS my openSource
> framework... i wait the time to test the as2toHaxe application to creates
> the haxe version of my framework)
>
>
http://svn.riaforge.org/vegas/AS2/trunk/src/vegas/util/factory/DisplayFactory.as
>
> Page of the projects :
>
> - http://vegas.riaforge.org/
>
> Installation in the google code page project of VEGAS :
>
> - http://code.google.com/p/vegas/
>
> EKA+ :)
>
> 2007/4/28, filt3r at free.fr <filt3r at free.fr>:
> >
> > Re :)
> > Sorry ... it works fine, but i have to pass the arguments to .
> >
> > 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
> > > >
> > >
> >
> >
> >
> > --
> > haXe - an open source web programming language
> > http://haxe.org
> >
>





More information about the Haxe mailing list