Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
ofxFashCommunication   for OF-007 and newer       www.roxlu.com
Add ofxFlashCommunication to XCode- Very simple to setup- Can handle hundreds of connections- Extremelly simple to use:2 f...
Add ofxFlashCommunication to XCodeAdd ofxFlashCommunication to your project:- create new group, call it ofxFlashCommunicat...
Code setupIn testApp.h- add #include ofxFlashCommunication.h- add member: “ofxFlashCommunication flash”
Code setupIn testApp.cpp- you application is the server- tell the server on which IP and port to run.- if you want to conn...
Code setupIn testApp.cpp - setup flash server- start listening on ip: 192.168.0.200 and port 1234- policy: all clients can...
Code setup - receive messageIn testApp.cpp - update()- check for message from flash client.
Code setup - send messageIn testApp.cpp- call ofxFlashCommunication::send(string msg)
Code setupIn Flash:- use the ofxFlashCommunication Actionscript 3classes- connect to the OF server- add an event listener ...
Code setupFlash document class example:
Upcoming SlideShare
Loading in …5
×

ofxFlashCommunication

7,281 views

Published on

Short presentation about how to use openFrameworks with Flash. You create a simple server in openFrameworks to which Flash connects using a socket. You can receive and send messages in both ways.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

ofxFlashCommunication

  1. 1. ofxFashCommunication for OF-007 and newer www.roxlu.com
  2. 2. Add ofxFlashCommunication to XCode- Very simple to setup- Can handle hundreds of connections- Extremelly simple to use:2 function calls to setup2 function calls for receiving messages.
  3. 3. Add ofxFlashCommunication to XCodeAdd ofxFlashCommunication to your project:- create new group, call it ofxFlashCommunication- drag the src directory onto it from Finder
  4. 4. Code setupIn testApp.h- add #include ofxFlashCommunication.h- add member: “ofxFlashCommunication flash”
  5. 5. Code setupIn testApp.cpp- you application is the server- tell the server on which IP and port to run.- if you want to connect from Flash which runs in abrowser or using a AIR application, you need toadd a policy. See adobe policy.xml information; totest you can just call: flash.addPolicy(“*”,”*”) whichallow all clients to connect.
  6. 6. Code setupIn testApp.cpp - setup flash server- start listening on ip: 192.168.0.200 and port 1234- policy: all clients can connect- start(), lets run!
  7. 7. Code setup - receive messageIn testApp.cpp - update()- check for message from flash client.
  8. 8. Code setup - send messageIn testApp.cpp- call ofxFlashCommunication::send(string msg)
  9. 9. Code setupIn Flash:- use the ofxFlashCommunication Actionscript 3classes- connect to the OF server- add an event listener which notifies you when theOF application sends data. Handle theNEW_DATA event.- use “send(msg:String)” to send data to the OFapplication.
  10. 10. Code setupFlash document class example:

×