OK so here is another newbie question from me...
I am attaching a number of button components to a MC like this:
var newMC = this.attachMovie("Button", tID, tDepth, {_x:tX, _y:tY,
_width:tWidth, _height:tHeight});
After these buttons are attached I want to use a function that is looking at
the width/height of the MC:s contents, but it it only returns 0. So I guess, I
have to wait using this function until the components has loaded properly. But
how do I know when they're ready?
I've tried to create simple onLoad-functions like:
newMC.onLoad=function () {
trace ("ready")
}
and:
var TypeListenerObj = new Object();
mx.events.EventDispatcher.initialize(newMC);
TypeListenerObj.load = function(eventObject) {
trace ("ready")
};
newMC.addEventListener("load", TypeListenerObj);
But with no success... can anybody point me in the right direction?
/David
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders