Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

html - Upload picture directly to the server -


in following link http://www.tuttoaster.com/create-a-camera-application-in-flash-using-actionscript-3/ how make picture upload directly server after taking picture webcam

package { import flash.display.sprite; import flash.media.camera; import flash.media.video; import flash.display.bitmapdata; import flash.display.bitmap; import flash.events.mouseevent; import flash.net.filereference; import flash.utils.bytearray; import com.adobe.images.jpgencoder;  public class caml extends sprite {     private var camera:camera = camera.getcamera();     private var video:video = new video();     private var bmd:bitmapdata = new bitmapdata(320,240);     private var bmp:bitmap;     private var filereference:filereference = new filereference();     private var bytearray:bytearray;     private var jpg:jpgencoder = new jpgencoder();      public function caml()     {         savebutton.visible = false;         discardbutton.visible = false;          savebutton.addeventlistener(mouseevent.mouse_up, saveimage);         discardbutton.addeventlistener(mouseevent.mouse_up, discard);         capture.addeventlistener(mouseevent.mouse_up, captureimage);          if (camera != null)         {             video.smoothing = true;             video.attachcamera(camera);             video.x = 140;             video.y = 40;             addchild(video);         }         else         {             trace("no camera detected");         }     }         private function captureimage(e:mouseevent):void         {             bmd.draw(video);             bmp = new bitmap(bmd);             bmp.x = 140;             bmp.y = 40;             addchild(bmp);              capture.visible = false;             savebutton.visible = true;             discardbutton.visible = true;         }          private function saveimage(e:mouseevent):void         {             bytearray = jpg.encode(bmd);             filereference.save(bytearray, "image.jpg");             removechild(bmp);             savebutton.visible = false;             discardbutton.visible = false;             capture.visible = true;         }          private function discard(e:mouseevent):void         {             removechild(bmp);             savebutton.visible = false;             discardbutton.visible = false;             capture.visible = true;         }   }  } 

the filereference.upload() , filereference.download() functions nonblocking. these functions return after called, before file transmission complete. in addition, if filereference object goes out of scope, upload or download has not yet been completed on object cancelled upon leaving scope. so, sure filereference object remain in scope long upload or download expected continue. http://help.adobe.com/en_us/as2lcr/flash_10.0/help.html?content=00001063.html


Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -