Also apply the __toString fix to UserInfo
[cacert-mgr.git] / external / ZendFramework-1.9.5 / externals / dojo / demos / faces / src / webcam.js
1 dojo.provide("demos.faces.src.webcam");
2 dojo.require("dojox.embed.Flash");
3
4 function setImage(data){
5 base64Img = "data:image/jpeg;base64," + data;
6 var found = false;
7 for(i in people){
8 if(people[i]=="webcam"){
9 found = true;
10 break;
11 }
12 }
13 if(! found) people.push("webcam");
14 dojo.style(dojo.byId("photoShot"), "display", "none");
15 dojo.query("#hair, #eyes, #mouth").forEach(function(item){
16 var image = new Image();
17 image.src = base64Img;
18 //dojo.body().appendChild(image);
19 dojo.style(item, "backgroundImage", "url(" + image.src + ")");
20 });
21 }
22
23 dojo.addOnLoad(function(){
24
25 var swf = dojo.moduleUrl("dojoc.flash", "photo_shot.swf");
26 var args = {
27 path: swf,
28 width:"100%",
29 height:"100%",
30 params:{
31 allowFullScreen:true,
32 wmode:"transparent"
33 }
34 }
35 var flashObj = new dojox.embed.Flash(args, "photoShot");
36
37 dojo.query("#addPic").onclick(function(e){
38 dojo.style("photoShot", "display", "");
39 });
40
41 dojo.removeClass("addPic","invisible");
42
43 });