Tag Archives: pattern:RegExp

How will you access the clipboard in an AIR application?

By | January 15, 2011

The following is a sample code to do this. Simply copy and paste. [xml] <xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init()"> public function init():void{ var str : String = "Hello"; System.setClipboard(str); var versionString:String = Capabilities.version; var pattern:RegExp = /^(w*) (d*),(d*),(d*),(d*)$/; var result:Object = pattern.exec(versionString); if (result != null) { trace("input: " + result.input); trace("platform: " + result[1]); trace("majorVersion: " + result[2]); trace("minorVersion:… Read More »