Schemaphic Systems Blog

Sharing experiences in Flash, Flex and AIR

Archive for the ‘Lingo’ Category

Playing WebCamera in Adobe Director

leave a comment »

Download the webcam Xtra from here and place it in Xtra folder.

Then place the following piece of code in script window:

————————————-

global webcamxtra

property w

property h

on beginsprite

w = 320

h = 240

webcamxtra = new xtra(“webcamxtra”)

webcamxtra.start(w, h)

end

on exitframe

–process one frame

webcamxtra.update()

–draw the images to the stage

img = webcamxtra.cameraImage() (the stage).image.copypixels(img, rect(0, 0, w*2, h*2), rect(0, 0, w, h))

end

———————–

Written by Deepanjan Das

June 5, 2010 at 10:16 PM