• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Camera getting disconnected while recording

Guest
Nov 08, 2013 Nov 08, 2013

Copy link to clipboard

Copied

For a certain demonstration of a video recording application at my workplace, we were using a panaromic camera, which required an external power source to remain turned on.

The video was recording fine, but suddenly, owing to a power fault, the camera turned off.

Now, my AS3 code wasn't prepared to handle a camera getting disconnected during recording - so I would like to know what happens when such a thing does happen. Does the Camera object become null? Does it trigger a particular event that I need to add an eventlistener for, on the Camera object?

I checkedthe documentation, and such a scenario hasn't been dealt with there.

Can anyone help?

TOPICS
ActionScript

Views

318

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guru ,
Nov 08, 2013 Nov 08, 2013

Copy link to clipboard

Copied

LATEST

you should be able to catch camera-discomnnetion wth sth like:

var cam:Camera = Camera.getCamera();

stage.addEventListener(Event.ENTER_FRAME, checkCam);

function checkCam(e:Event):void{

if (cam== null)

{

//do something

}

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines