日期:2014-05-17 浏览次数:20917 次
//保存 private function SavePicture():void { var width:Number,height:Number; if(t_vd_Video.visible == true){ width=m_localVideo.width; height=m_localVideo.height; }else{ width=m_localVideo1.width; height=m_localVideo1.height; } t_ban_Save.enabled = false; m_pictureData = ""; for(var i:int = 0; i < width; i++) { for(var j:int = 0; j < height; j++) { if(m_pictureData.length > 0) { m_pictureData += "," + m_pictureBitmapData.getPixel32(i,j).toString(); } else { m_pictureData = m_pictureBitmapData.getPixel32(i,j).toString(); } } } var params:URLVariables = new URLVariables(); params.width = width; params.height = height; params.bitmap_data = m_pictureData; params.id = idzd; params.workid = workidf; params.dm = dmf; //Alert.show("错误:"+width+"=="+height); t_ws_getFiles.send(params); } <mx:HTTPService id="t_ws_getFiles" url="http://localhost:8080/FlexHttpService/onLineTakePhotoServlet" showBusyCursor="true" method="POST" useProxy="false" result="__onGetFilesResult(event)" fault="__onGetFilesFault(event)"/> <mx:Panel x="205" y="34" width="629" height="487" layout="absolute" title="视频拍照" fontSize="12"> <mx:VideoDisplay id="t_vd_Video" width="600" height="400" x="12" y="9" /> <mx:VideoDisplay id="t_vd_Video1" width="600" height="400" x="12" y="9" visible="false"/> <mx:ControlBar horizontalAlign="right"> <mx:TextInput width="160" x="327" text="http://localhost:8080" id="txt_http"/> <mx:Button id="t_btn_Shooting" label="拍照" click="SnapshotPicture()"/> </mx:ControlBar> </mx:Panel> <mx:Panel id="t_panel_Picture" x="180" y="5" width="629" height="487" layout="absolute" title="拍照图片" fontSize="12" visible="false"> <mx:Image id="t_img_Picture" x="13" y="5" width="600" height="400"/> <mx:ControlBar horizontalAlign="right"> <mx:Button id="t_ban_Save" label="保存" click="SavePicture()" /> <mx:Button id="t_ban_Canel" label="取消" click="CanelPicture()" /> </mx:ControlBar> </mx:Panel>