Let frame return value

3 views
Skip to first unread message

Kurt Latre

unread,
Feb 2, 2012, 6:16:31 AM2/2/12
to AsWing Discuss
I don't know if this is even possible.

I've made a class that lets the user select an image in different
ways.

It shows a frame with the different possibilities, ...
When the users press the OK button, I call a function on the document
class. and returns a string with the selected image.
Because I need to reuse the class a few times in the movie, i would
like to have a more simple and elegant workaround.

it would be much nicer if i could get the name like this

var ImagePath:String = new ImageWindow()

In this way the ImageWindow-class (which is using the JFrame) would
return the ImagePath when the frame is closed or if the users press OK

Is it possible to let the class return a value in that way?

Thanks for your help
Reply all
Reply to author
Forward
0 new messages