apache-flex

Dynamically Casting In ActionScript

泪湿孤枕 提交于 2019-12-25 02:57:15
问题 Is there a way to cast dynamically in Actionscript? What I want to accomplish is illustrated by the following code: var Val:*; var S:String=SomeTextEdit.text; switch (DesiredTypeTextEdit.text) { case 'int':Val=int(S);break; case 'uint':Val=uint(S);break; case 'String':Val=String(S);break; case 'Number':Val=Number(S);break; ... } SomeDisplayObject[SomePropertyNameTextEdit.text]=Val; I am looking for something LIKE the following PSEUDOCODE: SomeDisplayObject[SomePropertyName]=eval(DesiredType)

How to calculate CRC checksum in Actionscript 3?

倾然丶 夕夏残阳落幕 提交于 2019-12-25 02:55:57
问题 I am developing an application in flex in which I need to calculate checksum of different files. I would like to know if there is a direct method in actionscript to calculate that or do I have to go for any external libraries? Thanks in advance :) 回答1: as3corelib maintained by Mike Chambers/Adobe, contains everything you probably need in its crypto section including: HMAC MD5 MD5Stream SHA1 SHA224 SHA256 WSSEUsernameTocken 回答2: how do you use this as3corelib to perform a md5 on a file i.e. "c

validation in flex datagrid using itemEditor

谁都会走 提交于 2019-12-25 02:53:25
问题 I have a datagrid which conatains two columns. Datatype and value. Datatype has a combobox with options like char, int, unsigned int, signed int etc.Now i want to have validation on what value is entered in value column. I am using following method . <mx:DataGridColumn headerText="Value" dataField="Values" width="100" editable="{!this.areVariablesReadOnly}"> <mx:itemEditor> <mx:Component> <mx:TextInput restrict="0-9" maxChars="3" /> </mx:Component> </mx:itemEditor> </mx:DataGridColumn> This

How do I recompile Flex 4 Framework RSLs?

感情迁移 提交于 2019-12-25 02:47:24
问题 Does anyone know how to recompile Adobe Flex 4 framework RSLs? I'm using the compiler directive -dump-config to get the build config file that the FlashBuilder IDE is using for compiling my application. I then pass that config file into the mxmlc compiler so I can build from the command-line. The results of the command-line build are output to a folder other than bin-debug. bin-debug is a localtrust path, and it will an application will run from there without error. A Flash application in any

Initializing a collection from MXML

旧城冷巷雨未停 提交于 2019-12-25 02:47:04
问题 Gentlepersons, How does one initialize a collection instance from MXML in Flex/Actionscript? Background Let's assume that: I've got three lists of number-name pairs. The contents of each list never changes, but I may want to add new lists in future. The user can choose which list to use. I know how to use MXML to define/initialize a Flex UI component, but that is the full extent of my XML experience. Problem How do I write a combination of XML declarations and Actionscript classes such that I

make cairngorm commands ALWAYS work synchronously

心不动则不痛 提交于 2019-12-25 02:46:09
问题 I see the benefit of asynchronous commands (waiting for server responses...) but in my flex app it creates me more problem than anything. Here's what I want: EVERY command executes only after the previous one returned (to result or fault function) And I'd like to do this as easily as possible.. by the way the GUI must become irresponsive (maybe a wait message) while a long command is being executed (I could show the wait message in the execute function and remove it in the fault or result

Adobe Flex 4.6 WebService request timeout

徘徊边缘 提交于 2019-12-25 02:34:15
问题 The code to get connected to my WebService (Lotus Notes Database) is created by the Flash Builder over "Data/Connect with WebService...". All works fine, but I have a problem to increase the request timeout. The API says that you can set the request timeout like this: _serviceControl.requestTimeout = 300; On a iOS (iPad) it seems to be work all fine. But if I run my app on desktop or on an android smartphone this only works if I set up the request timeout lower than ~30 seconds. If I don't

How to display local PDF in Flex Mobile Project?

蹲街弑〆低调 提交于 2019-12-25 02:27:05
问题 I am running Flex mobile project and I would like my mobile app to be able to load and display pdf files that are saved locally. I do not want to go out to the web to access these pdf files. I cant figure out how to make this code work for a locally saved file. Error MSG: "Error #2044: Unhandled ErrorEvent:. text=Load error." Does anyone have a suggestion? Thanks! <?xml version="1.0" encoding="utf-8"?> <s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark

Rendering form on the fly from XML in flex

不羁的心 提交于 2019-12-25 02:16:09
问题 I have an xml code something like this <root> <render> <head> <transition id="fadeIn" type="fade" subtype="" dur="3s"/> <transition id="fadeOut" type="fade" subtype="" dur="3s"/> <layout> <root-layout width="480px" height="360px" backgroundColor="0"/> <region id="rootRegion" dur="15s"> <region id="background" soundLevel="100%" top="0px" left="0px" width="480px" height="360px" z-index="0"/> <region id="foreground" soundLevel="100%" top="0%" left="0%" width="480px" height="360px" z-index="1"/>

Change the text color of a datagrid row on particular condition in AIR application in flex 4

こ雲淡風輕ζ 提交于 2019-12-25 02:14:10
问题 I want to change the text color of the datagrid row on particular condition ie. i am checking on a condition.If that satisfies then I have to change the text color of each cell ie the whole row. Here is the code, private function resultHandlerGrid(event:ResultEvent):void{ arrc1 = ArrayCollection(event.result); adg1.addEventListener( ListEvent.ITEM_CLICK,getValue); } private function getValue(e:ListEvent):void{ if(e.itemRenderer.data.priority == "High") { e.itemRenderer.data.client_name