質問
Alternative to onClipEvent(load) ?
How do you avoid using onClipEvent(load) ?
In the Actionscript 2.0 Best Practices article they say to avoid using on() and onClipEvent() handler functions, because it forces you to attach actions directly to a MovieClip. This works fine when replacing this:
on (release) {
// Do something.
}
with this:
myMovieClip.onRelease = function() {
// Do something.
};
But replacing onClipEvent(load) with myMovieClip.onLoad doesn't seem to work... Anyone know of a workaround?
In the Actionscript 2.0 Best Practices article they say to avoid using on() and onClipEvent() handler functions, because it forces you to attach actions directly to a MovieClip. This works fine when replacing this:
on (release) {
// Do something.
}
with this:
myMovieClip.onRelease = function() {
// Do something.
};
But replacing onClipEvent(load) with myMovieClip.onLoad doesn't seem to work... Anyone know of a workaround?
