actionscript 3 - clipboard fill url request -
what line of code need urlrequest automatically filled clipboard or extern *.txt file? as3 script , xxxxxx need script take automatically text clipboard , put there before execute, or take text extern *.txt file, put there , execute:
var request:urlrequest = new urlrequest("xxxxxx"); var loader:loader = new loader(); loader.contentloaderinfo.addeventlistener(progressevent.progress, loadprogress); loader.contentloaderinfo.addeventlistener(event.init, loadcomplete); loader.load(request); function loadprogress(event:progressevent):void { var percentloaded:number = math.ceil(event.bytesloaded/event.bytestotal); trace("loading: "+percentloaded+"%"); } function loadcomplete(event:event):void { trace("complete"); loader.contentloaderinfo.removeeventlistener(progressevent.progress, loadprogress); loader.contentloaderinfo.removeeventlistener(event.init, loadcomplete); loader.x = 0; loader.y = 0; addchild(loader); }
you can access clipboard , alter it, copy it, paste it, can paste in clipboard via paste event. has security issues.
flash player requires getdata() called in paste event handler. in air, restriction applies content outside of application security sandbox.
see http://help.adobe.com/en_us/flashplatform/reference/actionscript/3/flash/desktop/clipboard.html#getdata() more explanation.
Comments
Post a Comment