PDA

View Full Version : Prototype to component to use


simonboris
02-02-2005, 02:54 AM
Hi,

i have write a simple prototype that add a method to all movieclip:

MovieClip.prototype._xTest = function()
{
trace('this = '+ this);
}


This piece of code is in the first frame of my mc called 'test.clip'.
I then export to a component (swc file).

In theory, what i want to do is:

Drag and drop the component onto the stage and with that action, all mc in the current swf can have acces to the _xTest Method.

Well this is not working.
Does someone have an idea of how i could do this ?