Sébastien Pierre wrote:

Le 25 juil. 05 à 17:22, JesterXL a écrit :

Without SWFMill, no.  Try this:

createEmptyMovieClip("test_mc", 0);
test_mc.__proto__ = Cow.prototype;


Hmmm... I thought about this, but I thought it would break the inheritance with MovieClip, it sounds kind of too hackish (but may actually work !). You mentioned SWFmill, do you have any method to ensure that a MTASC-compiled MovieClip can be instanciated ?

Just make sure that Cow extends movieClip and the above will work. It is not hackish, as this is what the AS2 code gets converted into when complied.

Are you sure you need to sub-class MovieClip? I find that most everything can use composition, which is can be an easier style to use. Most objects that you'd create aren't really in a kind-of relationship with movieClips. They might use a MC to display themselves on screen, but they aren't MCs...

j

ps. see http://www.tweenpix.net/portraits/moock/colin_moock_en.htm, the question about "inheritance vs. composition"

and this link he references

http://www.artima.com/designtechniques/compoinh.html

--
jos yule
Digital Hyakugei

mailto:[EMAIL PROTECTED]
http://www.theorganization.net

jabber:[EMAIL PROTECTED]
msn:[EMAIL PROTECTED]
yahoo:digital_hyakugei
aim:josyule
icq:295196397

_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org

Reply via email to