Click to See Complete Forum and Search --> : Flash-Java

11-23-2000, 06:40 PM

Iīm working in a project what involves a GUI that will be developed with Flash; the system will be compound by various components: menus, buttons, a chat system and others.

The internal control of the whole interface will be developed using Java but I donīt know how to generate events from this interface in Flash and catch this events within the code in Java. For example, when the user write a
message in the text field of the chat, the chat has to detect the event and send the message to the chat server, enable or disable some components in the GUI and wait for a response from the server. When a response arrives,the control in Java has to print the message in the graphic component and execute some changes in the GUI. We need to know if it is possible like iīve described it, communicate Flash and Java. This because that is the architecture we need implement. If this isnīt possible, how can I interact Flash with C++??

In addition, I need to include an Internet Explorer window in the GUI what will let us display slides and URLīs. Is it possible to control the browser from Flash??

Iīd be really gratefull if you can help us with this information.

Thanks a lot.

11-24-2000, 02:01 PM
You can interact with Java from a swf with javascript.

11-27-2000, 07:48 AM
Flash interacts with the host program using 'FSCommand'. When the flash file calls this function, it sends a message to the host - be it a browser, a c++ program, or a java program. I'm not a java programmer, so I can't help you as to how to catch this message, but I imagine that the Flash object would have a way to catch it.

Otherwise try VB or C++. Those I could help you with.

Another way that Flash can interact with its host is through 'GetURL'. Perhaps that may point you in the right direction. Again, I wouldn't know for sure, but GetURL has the ability to call an 'event'. I've only ever used this with Flash in Director, but I see a function in the Java API that's called 'HandleEvent'. Perhaps they're related?

As far as controlling a browser from flash , I'd think that if java itself can control the browser, then you could use the java/flash interaction (using whichever method from above works) to tell java to tell the browser to do something - so Flash controls the browser via java. I don't think you could do it directly unless Flash was playing in the browser itself.


11-27-2000, 06:46 PM
You are correcty sorta. The Get URL event is a Javascript event. Like I said before You can use this to Call Javascript events that interact with the Java host.