air

in Flex how do I make a window not resizable?

好久不见. 提交于 2019-12-13 04:23:31
问题 So I'm trying to open a second window that is meant to be a fixed size window. I've set resizable property to false but that doesn't seem to have any effect. here's my sample code Main app <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" height="600" creationComplete="onCreationComplete()"> <fx:Script> <![CDATA[ import foo.TestWindow; protected function

Save file to sdcard as3 Air for Android

我们两清 提交于 2019-12-13 03:48:47
问题 I am making an android application in Air for android using actionscript 3. I need to download a file from the server and save it to mobile sdcard. Following is my code, the file gets loaded from the server but how do I save it on sdcard? import flash.filesystem.*; var urlString:String = "http://www.mywebsite.com/xyz/myswftodownload.swf"; var urlReq:URLRequest = new URLRequest(urlString); var urlStream:URLStream = new URLStream(); var fileData:ByteArray = new ByteArray(); urlStream

Flex AS3: ProgressBar doesn't move

血红的双手。 提交于 2019-12-13 03:48:10
问题 I am a little stuck and need some advice/help. I have a progress bar: <mx:ProgressBar id="appProgress" mode="manual" width="300" label="{appProgressMsg}" minimum="0" maximum="100"/> I have two listener functions, one sets the progress, and one sets the appProgressMsg: public function incProgress(e:TEvent):void { var p:uint = Math.floor(e.data.number / e.data.total * 100); trace("Setting Perc." + p); appProgress.setProgress(p, 100); } public function setApplicationProgressStep(e:TEvent):void {

How do I get the fullname of a file in Adobe AIR?

*爱你&永不变心* 提交于 2019-12-13 03:47:18
问题 I'm using something like this to browse for a file in AIR. I can get the filename, but what I need is the fullname of the file. Is there a way to do that? var file:FileReference = new FileReference(); file.addEventListener(Event.SELECT, selectHandler); file.browse(); private function selectHandler(e:Event):void{ file.removeEventListener(Event.SELECT, selectHandler); var name = file.name; } 回答1: I am not sure if FileReference can give you the absolute path of the file you selected. So I

FLEX: getting a folder size

[亡魂溺海] 提交于 2019-12-13 02:16:12
问题 I'm triying to get a folder size by doing: var FolderFile:File = new File("file:///SomePath/Folder"); var FolderSize: FolderFile.size; But this gives me a value of 0, how can I get the folder size? is there anyway to do this? Tranks 回答1: No, there's no way to do it automagically. Getting the size of the directory is a complex and potentially painfully slow operation. There could be 10s of thousands of files in a directory, or a directory could be located on a (slow?) network, not to mention

search in a local database (sql) with AS3

痞子三分冷 提交于 2019-12-13 02:11:51
问题 I've got an AS3 code that I want to link with a php. That php search in a database (sql) and send results to my AS3 code. So I've got 3 files : my project (FLA file), my php file, and my sql file. I would like to do this operation offline (local). How can I do ? In my AS3 code I've got : var urlreq = new URLRequest("myPHP.php"); urlreq.method = URLRequestMethod.POST; var urlVars = new URLVariables(); urlVars.theport = "New-York"; urlreq.data = urlVars; var loader:URLLoader = new URLLoader

How I find that string contain a repeating character more then 6 time in Flex?

◇◆丶佛笑我妖孽 提交于 2019-12-13 00:18:35
问题 How I find that string contain a repeating character more then 6 time in Flex? In my case the user input is only digits (0-9) and i am doing for US Fax no validation. like 11111112255 , 225555555522 etc 回答1: A regular expression way: /(.)\1{6}/ This will search for any character (not necessarily digit) repeated 7 times. /(\d)\1{6}/ The same, but for digits only. There are techniques that will be generally faster than regexp, for example, slightly modified Bitap algorithm may prove to be

Multiple consumers per StreamingAmf connection?

可紊 提交于 2019-12-13 00:06:46
问题 I have an Adobe Air 2.0 application that is also utilizing Spring BlazeDS integration. Inside this application I have a couple of data grids. The design was for each grid's model to register a Consumer to listen for changes pushed from BlazeDS. The first grid instantiated works correctly, however each subsequent grid causes the following warning in BlazeDS [WARN] [Endpoint.StreamingAMF] Endpoint with id 'streaming-amf' received a duplicate streaming connection request from, FlexClient with id

Codesigning SWF?

若如初见. 提交于 2019-12-12 23:23:02
问题 AIR allows to inject code using Loader.LoadBytes() this allows to download remote plugins as swf files which will have full access to everything that the AIR application has access to. This imposes a security risk, so it would be desirable to digitally sign the swf's. What's the best way to do this and to verify the code signature? I know the as3corelib has some encryption functionality and also for X.509 certificate - but I didn't find a ressource explaining how to use it. Also, maybe there

close air app, where is it?

こ雲淡風輕ζ 提交于 2019-12-12 23:00:37
问题 Seems System.exit(0) and flash.system.System.exit(0) both throw the error "[Fault] exception, information=SecurityError: Error #2018: System.exit is only available in the standalone Flash Player." I'm creating a fullscreen app and im simply want to add a close button that will close all windows and exit (i have a secondary window via NativeWindow open). Tons and tons of googling any nothing. Makes me wonder if im missing something super simple since all "chromless" apps would have to have