apache-flex

How do I set the dataProvider for an <s:List> component to be an XML file?

陌路散爱 提交于 2020-01-21 10:14:12
问题 I've got the latest Beta of Adobe Flash Builder 4. I want to use a <s:List> component, and specify the dataProvider as being an XML file. However, after loads of research (including looking at doc links off labs.adobe.com), I still can't figure out how to do it. The XML file will look something like this: <?xml version="1.0" encoding="ISO-8859-1"?> <imageList> <image location="path/to/file1.jpg" /> <image location="path/to/file2.jpg" /> <image location="path/to/file3.jpg" /> </imageList> 回答1:

Adobe AIR - listing installed applications

橙三吉。 提交于 2020-01-21 05:39:06
问题 Is it possible to get list of installed AIR applications, optionally only by one vendor? Or, is it possible to check, whether is one application (checked by name/some id/vendor) installed (this method would be preferred) Thank you. 回答1: You can do this: private function loadAIR():void { var loader:Loader = new Loader(); var loaderContext:LoaderContext = new LoaderContext(); loaderContext.applicationDomain = ApplicationDomain.currentDomain; loader.contentLoaderInfo.addEventListener(Event.INIT,

Can I bind a Flex component property to a function?

泪湿孤枕 提交于 2020-01-21 03:19:26
问题 I want to set the enabled property on a button based on the return value of a function that has one or more parameters. How can I do this? private function isUserAllowed (userName:Boolean):Boolean { if (userName == 'Tom') return true; if (userName == 'Bill') return false; } <mx:Button label="Create PO" id="createPOButton" enabled="<I want to call isUserAllowed ('Bill') or isUserAllowed ('Tom') here>" click="createPOButton_Click()" /> 回答1: <mx:Button enabled = "{this.myFunction(this.myVariable

Flex - Sending a parameter to a custom ItemRenderer?

时光怂恿深爱的人放手 提交于 2020-01-20 14:59:48
问题 What I am trying to accomplish to to get financial data in my Flex Datagrid to be color-coded--green if it's positive; red if it's negative. This would be fairly straightforward if the column I want colored was part of the dataProvider. Instead, I am calculating it based on two other columns that are part of the dataProvider. That would still be fairly straightforward because I could just calculate it again in the ItemRenderer, but another part of the calculation is based on the value of a

Flex - Sending a parameter to a custom ItemRenderer?

我的梦境 提交于 2020-01-20 14:58:44
问题 What I am trying to accomplish to to get financial data in my Flex Datagrid to be color-coded--green if it's positive; red if it's negative. This would be fairly straightforward if the column I want colored was part of the dataProvider. Instead, I am calculating it based on two other columns that are part of the dataProvider. That would still be fairly straightforward because I could just calculate it again in the ItemRenderer, but another part of the calculation is based on the value of a

Textured text in Actionscript

梦想与她 提交于 2020-01-17 14:03:33
问题 There is any way to make a text "textured" - with a result similar to this: http://www.entheosweb.com/fireworks/patterned_text.asp In Flex (so using AS3)? I though it was a simple issue, but I'm stuck: i'm googling it from days and was not able to find aa way or workaround to do it... 回答1: The rough idea is this: Create a TextField with whatever font you need, and write whatever text you want in there. Create a new BitmapData object and draw() the TextField so that you get a bitmap

Flex actionscript code for activitylevel

梦想的初衷 提交于 2020-01-17 06:59:35
问题 Can any one indicata me a small piece of code for making this progress bar move on mic activitylevel. i.e, When spoken on the microphone the progressbar should indicate it.Also which works on internet explorer <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" width="300" height="100" creationComplete="init()"> <mx:Script> <![CDATA[ import mx.controls.Alert; import flash.net.NetStream; private var myMic:Microphone; private var

Create a table like structure in flex [duplicate]

人走茶凉 提交于 2020-01-17 05:42:46
问题 This question already has an answer here : Closed 7 years ago . I want to create a form in a table like structure like we do in html. following is the basic structure i require![enter image description here][1] [1]: http://i.stack.imgur.com/H6b3f.png How to code such a structure? 回答1: Use the Spark Form components. Example (shamelessly modified from example on the help page): <s:Form id="myForm" width="450" height="125"> <s:FormHeading label="My Form Title" /> <s:FormItem label="Name:"> <s

flex air httpservice stream error and timing out

£可爱£侵袭症+ 提交于 2020-01-17 05:42:07
问题 We have an AIR client sending HTTPService Post request to Tomcat. The operation takes more than 30 seconds in the server since its a files transfer operation. By the time the server returns the response, Flex is throwing a fault, 2032, stream error ( checked a lot on the net ) Looks like its timing out after 30 seconds, waiting for the Http response. i tried setting ht.requestTimeout, it did not work. Setting URLRequestDefaults.idleTimeout also is not working. Looks like i have hit a dead end

Align two children differently in react native

Deadly 提交于 2020-01-17 04:34:06
问题 I'd like to have a header with a back button to the left and a text/title in the center of the header. Like this: <View style={styles.topbar}> <TouchableOpacity> <Text style={styles.topbarButton}>{" <"}</Text> </TouchableOpacity> <View> <Text style={styles.topbarText}>Title</Text> </View> </View> I'm trying to use flex in styles.topbar but nothing of what I tried seems to work. I am pretty new to flex and React Native so some help with the styles would be great. Thanks all. 回答1: Here we go: