0

I'm trying to build a projection installation for a university project, I want the audience to be able to communicate with the installation with their mobile phones.

This is what I'm trying to do:
- My Flash application will be running on a computer connected to the internet and will be connected to an XMLSocket hosted on my server.
- I need a javascript page which the audience can visit, mouse clicks (touches) will then send data from the javascript page to the socket server.
- Flash application will receive the data and so on..

Is it possible? I've been looking around for various resources, but they all require a flash app to be on the same page, which is not what I want.

I just need a standalone javascript page to be able to talk to a flash app.

Any suggestions or ideas for possible work arounds will be greatly appreciated.

Many thanks,
Will

2 Answers 2

1

Yes definitely possible. The server sits between the two (Flash and JS), they don't need to know each other exist. JS sends data to the server and Flash pulls it down.

Sign up to request clarification or add additional context in comments.

2 Comments

Hi Tyler, Sounds good, would you be able to send a link or give me an example of how you can send data from JS to the server?
Its all just HTTP requests, if you want to do it fast and easy, look at: api.jquery.com/jQuery.ajax
0

I am not sure to fully understand your question.

There is no such thing as a "javascript page", javascript is a... script running in a browser environment.

In the case you want to use an Android/iPhone app environment I don't think you need javascript to do this.
But if what you want is to have a web/wap page accessible to the mobiles, with a user interface, buttons, text field, whatever, which communicates in both directions with your XML socket, you need to build your user interface in HTML, and then to use some javascript to call your XML script and translate the response in the interface. If you have a server, can't you host also your UI there? The cross-domain issue would be avoided, otherwise it's easy enough through any server-side script (PHP?).

So yes it seems very possible, but I don't see what you mean by "they all require a flash app to be on the same page". Here's what I understood: Your Flash app is not what you want to load in the mobiles, it's connected to the server's XML in/out and working fine. You just want an interface communicating with this socket. Right?

1 Comment

Hi Nabab, thanks for your reply. Yeah sorry some of my terms were slightly off. What I meant is I need an HTML/CSS page with javascript, which the users will communicate with. The javascript should send data through the socket which the flash app will receive. What I meant by "they all require a flash app to be on the same page" is: they all need to supply a link to the flash app which the javascript is communicating with, my flash app would be completely seperate. Yeah all I need is a bit of help with connecting javascript to a socket and sending data. Hope that makes more sense!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.