0

I'm doing a project where I need to create some kind of GUI for the user as well as control some servo motors.

I'm thinking of using ActionScript for the GUI and C for to control the hardware. Is this even possible? How do I make ActionScipt talk to C and vice-versa?

Obviously the C part will be driving the motors and will send the data to the ActionScript GUI to be displayed to the user.

Is the above possible? If yes, could someone kindly provide me some pointers?

Thank you very much!

Edit: How do I pass a variable (e.g. x = 5) from ActionScript to be printed in C? Or is this not possible?

2 Answers2

0

"You could go via ASP to a DLL as TG suggested or you could probably call an ANSI C (command line) app and pass in variables (at least on a Windows PC)... that owuld be done using FSCommands. see this tutorial http://www.actionscripts.org/tutoria...es/index.shtml"

Originally replied by

Jesse Stratford

ActionScript.org Cofounder

This is taken from here

AurA
  • 12,135
  • 7
  • 46
  • 63
  • One thing to note: that post was written in 2001 during as2 days. We have more sophisticated ways of doing that stuff now. – sberry Dec 21 '12 at 06:46
  • Yes, 11 years later I'm sure we must have a more sophisticated way communicating between the two languages! :-) –  Dec 21 '12 at 07:01
0

I don`t know the specifics of programming servo motors but basically, if you want some C to AS3 interaction you could do one of the following:

  • Compile your C/C++ code using flascc.
  • Wrap your C code in a native extension (if you are targeting AIR).
  • As sberry suggested - use Sockets.
Varnius
  • 1,527
  • 1
  • 12
  • 14