scope problem. try to create the Delegate before applying it to the
onEnterFrame function like that:
function new() {
var del:Funtion = Delegate.create(this,traceIt);
_root.onEnterFrame = del;
}
problem arises because you are in _root.onEnterFrame.
your "this" will point to _root, not on your class instance.
try it out!
Note: I had set the "USEMX" option in flash develop to true...
import mx.utils.Delegate;
class New {
function New() {
_root.onEnterFrame = Delegate.create(this, traceIt);
}
private function traceIt() {
trace("tracing");
}
}
well this should trace "tracing" on frame rate, but it doesn't... even
if i
don't use delegate and i i do:
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com