Controlling an actual robot with a flash GUI

I was just wondering how the heck I can connect the two - xml socket? I’m not sure how to start googling this topic.

I want to use my flash apps for more than just web functionality, I want control over the things outside my computer!

Any ideas, suggestions?