send mouse events to osx?

hi, ive been building apps with OF on osx. my first working setup includes OF app sending via osc to flosc and flex using touchlib as3 clases to get blobs. soon ill have my table built.
now ive been looking for ways to send mouse events to osx directly from OF apps. ive found that there is a java.awt.robot that can doit and X11/xlib too. but im new to c++ and other languages from AS3. how can i use any of this resources within OF?
can i build my OF within a cocoa app?
in advance thanks