Wednesday, 9 December 2009

Mendeteksi Webcam dengan Flash


1. File > import > import video ( usahakan yang support, missal flv )

2. Drag movie tersebut ke stage

3. Hapus semua frame yang terdapat di time line dan sisakan 1 frame saja

4. Klik kanan video pada library > properties > video actionscript > ok

5. Ganti layer nama tersebut menjadi output > dan properties videonya dengan nama output

6. Buat layer baru dengan nama action

7. Beri action layer tersebut

max=7

cam=Camera.get()

cam.onStatus==function(e)

{

If(e.code==camera.Unmuted)

{

Initialize()

}

Else

{

System.showSetting(3)

}

}

If(cam==null)

{

System.showSetting(3)

}

Else

{

Output.attachVideo(cam)

}

0 comments:

Post a Comment