STORY LOOP FURRY PORN GAMES C SERVICES [?] [R] RND POPULAR | Archived flashes: 229494 |
/disc/ · /res/ — /show/ · /fap/ · /gg/ · /swf/ | P0001 · P2575 · P5149 |
This is the info page for Flash #36830 |
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 2stage.showMenu = false;Frame 3stop();Frame 5c = Camera.get(); webCam.attachVideo(c);Symbol 13 Buttonon (release) { getURL ("http://www.newgrounds.com", "blank"); }Symbol 18 Buttonon (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 2gotoAndPlay (1);Symbol 24 Buttonon (press) { _root.nextFrame(); }Symbol 34 Buttonon (press) { _root.nextFrame(); }Symbol 39 Buttonon (press) { _root.nextFrame(); }Symbol 42 Buttonon (press) { _root.gotoAndStop(6); }Symbol 47 Buttonon (press) { _root.prevFrame(); }Symbol 52 Buttonon (press) { _root.gotoAndStop(4); }Symbol 63 Buttonon (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 Buttonon (press) { getURL ("http://denvish.net/ulf/1155205965_webcam.fla", "_blank"); }
Library Items
Symbol 1 Sound [mySong] | Used by:Timeline | |
Symbol 2 Font | Used 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 Text | Uses:2 | Used by:Timeline |
Symbol 4 Text | Uses:2 | Used by:Timeline |
Symbol 5 Graphic | Used by:19 | |
Symbol 6 Graphic | Used by:7 | |
Symbol 7 MovieClip | Uses:6 | Used by:19 |
Symbol 8 Graphic | Used by:19 | |
Symbol 9 Graphic | Used by:12 13 | |
Symbol 10 Graphic | Used by:12 13 | |
Symbol 11 Graphic | Used by:12 13 | |
Symbol 12 MovieClip | Uses:9 10 11 | Used by:13 |
Symbol 13 Button | Uses:12 9 10 11 | Used by:19 |
Symbol 14 Graphic | Used by:18 | |
Symbol 15 Graphic | Used by:18 | |
Symbol 16 Graphic | Used by:18 | |
Symbol 17 Graphic | Used by:18 | |
Symbol 18 Button | Uses:14 15 16 17 | Used by:19 |
Symbol 19 MovieClip | Uses:5 7 8 13 18 | Used by:Timeline |
Symbol 20 Text | Uses:2 | Used by:Timeline |
Symbol 21 Graphic | Used by:22 24 | |
Symbol 22 MovieClip | Uses:21 | Used by:24 30 Timeline |
Symbol 23 Graphic | Used by:24 | |
Symbol 24 Button | Uses:22 23 21 | Used by:Timeline |
Symbol 25 Text | Uses:2 | Used by:Timeline |
Symbol 26 Font | Used by:27 64 | |
Symbol 27 Text | Uses:26 | Used by:Timeline |
Symbol 28 Graphic | Used by:30 | |
Symbol 29 Graphic | Used by:30 | |
Symbol 30 MovieClip | Uses:28 22 29 | Used by:Timeline |
Symbol 31 Text | Uses:2 | Used by:Timeline |
Symbol 32 Graphic | Used by:34 | |
Symbol 33 Graphic | Used by:34 | |
Symbol 34 Button | Uses:32 33 | Used by:Timeline |
Symbol 35 Text | Uses:2 | Used by:Timeline |
Symbol 36 Text | Uses:2 | Used by:Timeline |
Symbol 37 Graphic | Used by:39 | |
Symbol 38 Text | Uses:2 | Used by:39 |
Symbol 39 Button | Uses:37 38 | Used by:Timeline |
Symbol 40 Graphic | Used by:42 | |
Symbol 41 Text | Uses:2 | Used by:42 |
Symbol 42 Button | Uses:40 41 | Used by:Timeline |
Symbol 43 Video | Used by:Timeline | |
Symbol 44 Graphic | Used by:Timeline | |
Symbol 45 Graphic | Used by:47 52 | |
Symbol 46 Graphic | Used by:47 52 | |
Symbol 47 Button | Uses:45 46 | Used by:Timeline |
Symbol 48 Text | Uses:2 | Used by:Timeline |
Symbol 49 Text | Uses:2 | Used by:Timeline |
Symbol 50 EditableText | Uses:2 | Used by:Timeline |
Symbol 51 Text | Uses:2 | Used by:Timeline |
Symbol 52 Button | Uses:45 46 | Used by:Timeline |
Symbol 53 Text | Uses:2 | Used by:Timeline |
Symbol 54 Bitmap | Used by:55 | |
Symbol 55 Graphic | Uses:54 | Used by:Timeline |
Symbol 56 Text | Uses:2 | Used by:Timeline |
Symbol 57 Text | Uses:2 | Used by:Timeline |
Symbol 58 EditableText | Uses:2 | Used by:Timeline |
Symbol 59 Text | Uses:2 | Used by:Timeline |
Symbol 60 Text | Uses:2 | Used by:Timeline |
Symbol 61 Graphic | Used by:63 | |
Symbol 62 Text | Uses:2 | Used by:63 |
Symbol 63 Button | Uses:61 62 | Used by:Timeline |
Symbol 64 Text | Uses:26 | Used by:Timeline |
Symbol 65 Graphic | Used by:67 | |
Symbol 66 Text | Uses:2 | Used by:67 |
Symbol 67 Button | Uses:65 66 | Used by:Timeline |
Symbol 68 Text | Uses:2 | Used by:Timeline |
Instance Names
"webCam" | Frame 5 | Symbol 43 Video |
"bar" | Symbol 19 MovieClip Frame 1 | Symbol 7 MovieClip |
Special Tags
ExportAssets (56) | Timeline Frame 1 | Symbol 1 as "mySong" |
ExportAssets (56) | Timeline Frame 3 | Symbol 1 as "mySong" |
Labels
"loaded" | Symbol 19 MovieClip Frame 3 |
|