Skip to main content
Participant
March 25, 2011
Question

AS3 - Camera Light as torch in Android

  • March 25, 2011
  • 1 reply
  • 2506 views

I've searched the docs and the internet for some time, but I just can't find out, how to call the camera light in AS3.

I want to turn it on and use it as a torch for my app.

Thanks in advance.

This topic has been closed for replies.

1 reply

Lee_Burrows
Participating Frequently
April 5, 2011

hi

i dont think thats possible. technically, AIR does not have access to a device camera - AIR talks to the OS which in turn controls the camera. The OS then passes image data back to AIR.

i suspect that the OS wouldnt let you turn on the light even if you wrote a native java application because it would drain the battery super quick

Participant
June 22, 2014

Use this ANE sewonist/FlashLight · GitHub

I'm wondering how to use the camera and flash light. D: You can only have one camera open at time and the ANE opens the camera to access the light.