FFighter
07-12-2005, 05:37 PM
Well, I have a nested ProgressBar component within my own component. My componentīs class extends from UIComponent. The PBar class also extends from UIComponent so it should have support for the eventDispatcher stuff right? In the draw() method Iīm trying to register a listener to the "complete" event of the ProgressBar but it just doesnīt fire the function in the object:
function draw() {
pbar = lmc.createClassObject(ProgressBar,"pbar",lmc.getNextHighestDepth());
var pbar_listener:Object = new Object();
pbar_listener.complete = function(eo:Object) {
trace("called!");
}
pbar.addEventListener("complete",pbar_listener);
}
if I just specify the callback for the complete, then it works:
pbar.complete = function() {
trace("works");
}
What could be wrong?
function draw() {
pbar = lmc.createClassObject(ProgressBar,"pbar",lmc.getNextHighestDepth());
var pbar_listener:Object = new Object();
pbar_listener.complete = function(eo:Object) {
trace("called!");
}
pbar.addEventListener("complete",pbar_listener);
}
if I just specify the callback for the complete, then it works:
pbar.complete = function() {
trace("works");
}
What could be wrong?