actionscript 3 - Turn off application temporarily from flash -
i have been asked figure out way turn off running application on host computer when flash application running in browser, seemingly difficult task have thought of few possible ways achieve , ask approach best.
the way see these possibilities
- have flash application create cookie program checks , if detected, program running on computer turn off other application.
- have program running on host computer listening on specific port , when proper string sent fx. through use of actionscript sockets, program turn off application temporarily.
- create program sniffing network traffic , if swf in question being downloaded, turn off other application temporarily (this seems me least viable approach, not sure possible effectively)
the reason need this, because flash application need access webcamera of host computer, doubles motion detecting camera means camera locked while motion detection software running. need turn off motion detection software, grab picture in flash, save picture , start motion detection again.
am missing super simple approach? how achieve this? in advance answers.
tbh don't think you'll succeed in this, unless create air app (granted, didn't spend brain power on thinking solutions). flash player restricting on can , cannot do. externalinterface replacement of fscommand, considered obsolete, btw. allows communicate swf container. js (and maybe vbscript?) though.
however, if turns out need create air app, can use nativeprocess allows run application on host. instance, if you'd want run java .jar this:
var javaexecutable : file = new file(); javaexecutable.nativepath = '/path/to/java/'; var processarguments : vector.<string> = vector.<string>([ '-jar', '/path/to/jar/', 'foo' ]); var process : nativeprocessstartupinfo = new nativeprocessstartupinfo(); process.executable = javaexecutable; process.arguments = processarguments; var shell : nativeprocess = new nativeprocess(); shell.addeventlistener(nativeprocessexitevent.exit, onexitevent); shell.addeventlistener(progressevent.standard_output_data, onstdoutputdataevent); shell.start(process); very important note: (emphasis mine)
the nativeprocess class , capabilities available air applications installed native installer (extended desktop profile applications).
Comments
Post a Comment