This content has been marked as final. Show 7 replies
why do you need a return value from loadFrom? why not trigger the use of output when loading is complete in completeHandler?
i can't. I'm writing a custom class.
When I did that (hard code a text field to change to "output"), it did work perfectly however, I don't know now which text fields to change text of, even if I want to do that.
Now, that's up to the user of this custom class (which I just erased from the example and left you the core pieces) to use the DATA RETURNED from the custom class to any way s/he chooses to use it as.
I'm pretty sure its possible...
you edited the code in your message and my comment and your message make no sense. in addition, your code has an obvious error in completeHandler where you've coded a return string and a void return.
if you're trying to communicate the value of output (after loading is complete) to an object that's in your class scope you can attach a listener to your object and dispatch a custom event from completeHandler.
kglad. I'm sorry.
I am trying to oversimplify the code on this forum. In my flash, I did edit the "void" into true return types and everything is correct. And sorry about that edit. I really need this solved, and this topic is already on 3 forums (here, kirupa, and gotoandlearn). I guess I need more patience. However, please just look at the very general terms of the code. I will edit the code again to fix the things you have pointed out.
Could I use a Dispatch? I heard about it but I have no clue how its done.
you can use dispatchevent, but i don't know if that will help you. does the object that needs to use output exist in your class'es scope? if yes, dispatchevent will help.
How about using a custom event class?
Jeez. I didn't know trying to pass back some values from a function called from an eventListener couldn't be this hard!
that won't get the event out of your class scope, if that's the problem.