Although properties that are set in a class or a frame script are available immediately, most
properties assigned in the Property inspector or Component inspector are not set until the next
frame within the component itself.
Although any approach that delays access of the property will resolve this problem, the simplest
and most direct solution is to use the
Example
The following example shows how the
// doLater() is called from the component instance
myCheckBox.doLater (this, "delay");
// the function or method called from doLater()
function delay() {
trace(myCheckBox.label); // the property can now be traced
// any additional statements go here
}
UIObject.draw
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004.
Usage
on(draw){
...
}
listenerObject = new Object();
listenerObject.draw = function(eventObject){
...
}
componentInstance.addEventListener("draw", listenerObject)
Description
Event; notifies listeners that the object is about to draw its graphics. This is a low-level event that
you should not use unless necessary, because it can affect system performance.
The first usage example uses an
component instance.
method.
doLater()
method is used:
doLater()
handler and must be attached directly to a
on()
UIObject class
813
Need help?
Do you have a question about the FLASH MX 2004-USING COMPONENTS and is the answer not in the manual?
Questions and answers