Adobe AIR to execute program

With AIR 2.0 you now can: if(NativeProcess.isSupported) { var file:File = File.desktopDirectory; file = file.resolvePath(“StyleLookupold.exe”); var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo(); nativeProcessStartupInfo.executable = file; var process:NativeProcess = new NativeProcess(); process.start(nativeProcessStartupInfo); } You also need to add this to your descriptor file. <supportedProfiles>extendedDesktop</supportedProfiles>

Download files like mega.co.nz

Mega uses several different methods to do this: (as of 27 Nov 2013) Filesystem API (Chrome/Firefox Extension polyfill) Adobe Flash SWF Filewriter (old browsers fallback) BlobBuilder (IE10/IE11) MEGA Firefox Extension (deprecated) Arraybuffer/Blob (in memory) + a[download] (for browsers that support a[download]) MediaSource (experimental streaming solution) Blob stored in IndexedDB storage + a[download] (Firefox 20+, improvement … Read more

What is crossdomain.xml file?

“A cross-domain policy file is an XML document that grants a web client—such as Adobe Flash Player, Adobe Reader, etc.—permission to handle data across multiple domains.”. Taken from Adobe website http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html. EDIT: Answer to question 2: Flex crossdomain.xml not working correctly in Chrome/Firefox?. Install Adobe Flash Player for developers, Fiddler (or similar), these tools should … Read more

Div Z-Index issue with Flash movie

Here is a blog post that explains this issue Flash content and z-index Use <param name=”wmode” value=”transparent”> From Flash OBJECT and EMBED tag attributes wmode Possible values: window, opaque, transparent. Sets the Window Mode property of the Flash movie for transparency, layering, and positioning in the browser. * window – movie plays in its own … Read more

To pass a parameter to event listener in AS3 the simple way… does it exist?

Out of the box: it only takes 2 extra lines of elegant code to solve this ancient puzzle. stage.addEventListener(MouseEvent.CLICK, onClick(true, 123, 4.56, “string”)); function onClick(b:Boolean, i:int, n:Number, s:String):Function { return function(e:MouseEvent):void { trace(“Received ” + b + “, ” + i + “, ” + n + ” and ” + s + “.”); }; … Read more

Rails flash notice via ajax

Here is an example that I got working, thanks to Rich Peck’s answer. I needed to use flash.now to make sure the flash notice didn’t persist. AJAX trigger in the view: <%= link_to “Email report”, users_path, remote: true %> Controller: # app/controllers/users_controller class UsersController < ApplicationController def index # do some things here respond_to do … Read more

tech