Schemaphic Systems Blog

Sharing experiences in Flash, Flex and AIR

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

———————–

Advertisements

Written by Deepanjan Das

June 5, 2010 at 10:16 PM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: