Re: [Flashcoders] MovieClip prototype

2007-03-29 Thread eka
Hello :) try this : // constructor of the class _global.MyButton = function() { trace( this + constructor) ; } // inject addListener, removeListener and broadcastMessage methods in the prototype AsBroadcaster.initialize(MyButton.prototype) ; // the methods of your custom class

Re: [Flashcoders] MovieClip prototype

2007-03-29 Thread Matheus Araujo
It worked... but just for the mc instance... I have lots of MCs working as buttons on my movie and I don't want to call the function on each button... I need to have a listener to detect which MC has an onRelease on it and set an onRollover function to them... Is that possible? thx On

Re: [Flashcoders] MovieClip prototype

2007-03-29 Thread eka
Hello :) you can use VEGAS (http://vegas.riaforge.org/) my openSource framework for example... with this class DisplayFactory and the method createChild or attachChild : 1 - download the project on RIAForge or use a Subversion client like TortoiseSVN to upload all the versionning project with

[Flashcoders] MovieClip prototype

2007-03-28 Thread Matheus Araujo
Hello coders... I'm trying to create a MovieClip prototype function to all my MCs that are buttons: MovieClip.prototype.onRollOver = function (){ if (this.onRelease != undefined || this.onPress != undefined){ functionName(param); } } The problem is that it doesn't work with the