This content has been marked as final. Show 6 replies
Not sure I follow exactly, but in AS2 event handlers usually change the scope away from the class instance to their own instance.
I think you need to use the Delegate class to keep the scope within your class.
Don't forget to import mx.utils.Delegate
The reading on this is assigning to a specific function for a specific event.
But, what about when using
_MCLiListener = new Object();
_MCLiListener.onLoadStart = function(...
_MCLiListener.onLoadInit = function(... etc.
_MCLi = new MovieClipLoader();
_MCLi.addListener( _MCLiListener, Delegate.create(this,_MCLiListener) );
How exactly would i write that to it?
or you may be making your variables local the functions where they are typed using the var prefix.
the vars are definitely not local to the function. They are accesible from within all the functions of the Class just not the event handlers
I would try:
I thought you were using the other kind of event listeners. I've never tried this, but it seems like it should work? Let us know.
hmm. well right now i've done the following which is partially working. The variables that i was not able to get at I can now get at. The only remaining problem is that the getBytesTotal is never found or defined something odd.?