If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Hybrid View

Passing Flash variables directly to Java

This is a problem that has been annoying me for a long time. First of all, I am not very experienced in Java, but I know Actionscript pretty well. Anyway, my problem is this: How can I get a variable (more specifically, a string) from Flash to a Java server?

Note, I am trying to get these variables to an actual .java file on a server, not a servlet like .jsp or .php (although if that is the best solution, I could try that too).

As you can see, this is just a very simple program that is supposed to pass "Hello" from Flash to flash2java.java on the server. However, the only thing I get on the screen is a null because the java is not recieving anything from the Flash.

The problem that I think is happening is that the java file is only requesting the variable once. If I can get the java file to "poll" for the variable and only display it (or anything else I need to do with it) when it actually recieves it from the Flash, then that would be great.