A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Flash-Java

  1. #1
    Junior Member
    Join Date
    Nov 2000
    Posts
    1

    Arrow

    Hello,

    Im 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 dont 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 ive described it, communicate Flash and Java. This because that is the architecture we need implement. If this isnt 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 URLs. Is it possible to control the browser from Flash??

    Id be really gratefull if you can help us with this information.

    Thanks a lot.



  2. #2
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    You can interact with Java from a swf with javascript.

  3. #3
    Junior Member
    Join Date
    Aug 2000
    Posts
    13

    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.

    DJSole

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    5,087
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center