STORY   LOOP   FURRY   PORN   GAMES
• C •   SERVICES [?] [R] RND   POPULAR
Archived flashes:
229494
/disc/ · /res/     /show/ · /fap/ · /gg/ · /swf/P0001 · P2575 · P5149

<div style="position:absolute;top:-99px;left:-99px;"><img src="http://swfchan.com:57475/13486394?noj=FRM13486394-14DC" width="1" height="1"></div>

Webcam in flash tutorial.swf

This is the info page for
Flash #36830

(Click the ID number above for more basic data on this flash file.)


Text
Rohedin's

WEBCAM IN FLASH TUTORIAL

Click webcam to
start

Audio by RFInfection

V1.04

Hi! Welcome to the webcam tutorial. I'm
sure that, on NewGrounds you've come
accross a few webcam cames. Well this
tutorial covers the very basics of webcam
games and how you can improve your
flashes by using the webcam. Use the
arrows at the top to continue.

Webcam inFlash tutorial

Ok too see a preview of what you will
be able to do at the end of this tutorial
you need to have your webcam plugged
in.

it's plugged in!

I'ts not. I'll just
skip the preview.

TADA!

So that looked pretty cool right? Well first
of all put this code on the frame you want
the webcam stream to appear on:

c = Camera.get();
webCam.attachVideo(c)

Not much explaing needed. The first line gets & defines the footage from the
camera as 'c'
The second line just says that the video called webCam (see next pages)
should stream from 'c'

Right! Next of all, open up your library and
click in the top right corner(see pic, some
people will find they should right click
anywhere instead depending on flash
version) and select 'new video'(AS-
controlled) Once youve done that drag the
video from the library into the main scene.

Click here!

Okey dokey, the embedded video at the
moment should appear as a box with a big
X in the middle. To get the script to work
fully you should click on it at give it the
instance name:

webCam

Test you movie and it should work. Now you can play around
by adding borders and using tranparent shapes.

At the moment I don't know any more
about webcams in flash put if you want to
go one step further then

CLICK ME!!!

END OF TUTORIAL

Example .fla file

or

ActionScript [AS1/AS2]

Frame 1
_root.bytesLoaded = _root.getBytesLoaded(); _root.bytesTotal = _root.getBytesTotal(); _root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
Frame 2
stage.showMenu = false;
Frame 3
stop();
Frame 5
c = Camera.get(); webCam.attachVideo(c);
Symbol 13 Button
on (release) { getURL ("http://www.newgrounds.com", "blank"); }
Symbol 18 Button
on (release) { _root.nextFrame(); }
Symbol 19 MovieClip Frame 1
_root.stop(); PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100; if (PercentLoaded != 100) { bar._xscale = PercentLoaded; } else { gotoAndStop (3); }
Symbol 19 MovieClip Frame 2
gotoAndPlay (1);
Symbol 24 Button
on (press) { _root.nextFrame(); }
Symbol 34 Button
on (press) { _root.nextFrame(); }
Symbol 39 Button
on (press) { _root.nextFrame(); }
Symbol 42 Button
on (press) { _root.gotoAndStop(6); }
Symbol 47 Button
on (press) { _root.prevFrame(); }
Symbol 52 Button
on (press) { _root.gotoAndStop(4); }
Symbol 63 Button
on (press) { getURL ("http://livedocs.macromedia.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flash_MX_2004&file=00000981.html", "_blank"); }
Symbol 67 Button
on (press) { getURL ("http://denvish.net/ulf/1155205965_webcam.fla", "_blank"); }

Library Items

Symbol 1 Sound [mySong]Used by:Timeline
Symbol 2 FontUsed by:3 4 20 25 31 35 36 38 41 48 49 50 51 53 56 57 58 59 60 62 66 68
Symbol 3 TextUses:2Used by:Timeline
Symbol 4 TextUses:2Used by:Timeline
Symbol 5 GraphicUsed by:19
Symbol 6 GraphicUsed by:7
Symbol 7 MovieClipUses:6Used by:19
Symbol 8 GraphicUsed by:19
Symbol 9 GraphicUsed by:12 13
Symbol 10 GraphicUsed by:12 13
Symbol 11 GraphicUsed by:12 13
Symbol 12 MovieClipUses:9 10 11Used by:13
Symbol 13 ButtonUses:12 9 10 11Used by:19
Symbol 14 GraphicUsed by:18
Symbol 15 GraphicUsed by:18
Symbol 16 GraphicUsed by:18
Symbol 17 GraphicUsed by:18
Symbol 18 ButtonUses:14 15 16 17Used by:19
Symbol 19 MovieClipUses:5 7 8 13 18Used by:Timeline
Symbol 20 TextUses:2Used by:Timeline
Symbol 21 GraphicUsed by:22 24
Symbol 22 MovieClipUses:21Used by:24 30  Timeline
Symbol 23 GraphicUsed by:24
Symbol 24 ButtonUses:22 23 21Used by:Timeline
Symbol 25 TextUses:2Used by:Timeline
Symbol 26 FontUsed by:27 64
Symbol 27 TextUses:26Used by:Timeline
Symbol 28 GraphicUsed by:30
Symbol 29 GraphicUsed by:30
Symbol 30 MovieClipUses:28 22 29Used by:Timeline
Symbol 31 TextUses:2Used by:Timeline
Symbol 32 GraphicUsed by:34
Symbol 33 GraphicUsed by:34
Symbol 34 ButtonUses:32 33Used by:Timeline
Symbol 35 TextUses:2Used by:Timeline
Symbol 36 TextUses:2Used by:Timeline
Symbol 37 GraphicUsed by:39
Symbol 38 TextUses:2Used by:39
Symbol 39 ButtonUses:37 38Used by:Timeline
Symbol 40 GraphicUsed by:42
Symbol 41 TextUses:2Used by:42
Symbol 42 ButtonUses:40 41Used by:Timeline
Symbol 43 VideoUsed by:Timeline
Symbol 44 GraphicUsed by:Timeline
Symbol 45 GraphicUsed by:47 52
Symbol 46 GraphicUsed by:47 52
Symbol 47 ButtonUses:45 46Used by:Timeline
Symbol 48 TextUses:2Used by:Timeline
Symbol 49 TextUses:2Used by:Timeline
Symbol 50 EditableTextUses:2Used by:Timeline
Symbol 51 TextUses:2Used by:Timeline
Symbol 52 ButtonUses:45 46Used by:Timeline
Symbol 53 TextUses:2Used by:Timeline
Symbol 54 BitmapUsed by:55
Symbol 55 GraphicUses:54Used by:Timeline
Symbol 56 TextUses:2Used by:Timeline
Symbol 57 TextUses:2Used by:Timeline
Symbol 58 EditableTextUses:2Used by:Timeline
Symbol 59 TextUses:2Used by:Timeline
Symbol 60 TextUses:2Used by:Timeline
Symbol 61 GraphicUsed by:63
Symbol 62 TextUses:2Used by:63
Symbol 63 ButtonUses:61 62Used by:Timeline
Symbol 64 TextUses:26Used by:Timeline
Symbol 65 GraphicUsed by:67
Symbol 66 TextUses:2Used by:67
Symbol 67 ButtonUses:65 66Used by:Timeline
Symbol 68 TextUses:2Used by:Timeline

Instance Names

"webCam"Frame 5Symbol 43 Video
"bar"Symbol 19 MovieClip Frame 1Symbol 7 MovieClip

Special Tags

ExportAssets (56)Timeline Frame 1Symbol 1 as "mySong"
ExportAssets (56)Timeline Frame 3Symbol 1 as "mySong"

Labels

"loaded"Symbol 19 MovieClip Frame 3




http://swfchan.com/8/36830/info.shtml
Created: 14/5 -2019 22:26:37 Last modified: 14/5 -2019 22:26:37 Server time: 14/11 -2024 06:45:42