apache-flex

How do you delete itemrenderers in a spark Listform for mobile?

牧云@^-^@ 提交于 2019-12-12 04:43:24
问题 I've got a spark ListForm with a custom mxml itemRenderer, all the itemRenderer has is: <s:Label text="{data.name}" /> When I run the profiler, the listform is not re-using the itemRenderers, the instances keep going up and up, I'm using an arrayCollection as the dataprovider. I even call the dataprovider (arrayCollection) .removeAll() and the display goes blank, yet the number of instances of the itemRenderer does not go down. I then run the garbage collector in the profiler, and the item

Deserialize XML to custom Class in Flex?

梦想的初衷 提交于 2019-12-12 04:39:58
问题 Is it possible to deserialize an XML file to a class in Flex without manually checking the XML and/or creating the class, with the help of a HttpService ? Edit: Explained a bit more and better. We have an XML file which contains: <Project> <Name>NameGoesHere</Name> <Number>15</Number> </Project> In Flex we want this to be serialized to our Project class: package com.examplepackage { import mx.collections.ArrayCollection; [XmlClass] public class Project { public var Name:String; public var

How to know if there are sub items/nodes in an AdvancedDatagrid

我们两清 提交于 2019-12-12 04:37:46
问题 To summarize: How can I remove a node branch (level 1) if it has zero Data items? And in turn also remove Node at higher level 0 if it's sub items are (empty or have been) removed? After much searching on the internet I still need to know if how to find out if an AdvancedDatagrid or a "node" contains children. How to know if it's empty or has "something"? With it, I will be able to filter it with my function.. (Expalined below): Firstly I apologize for my bad english. I have an

Which version of Flex Builder do I need?

无人久伴 提交于 2019-12-12 04:35:49
问题 I have a Flex project that I need to work on that using some mxml elements which I believe are charting related: Pie Chart, and some LineGraphs. Do I need to buy Flex Builder Professional to compile the project, or will Standard work? On a related side-note, the Adobe website is brutal. I was going to use Eclipse with the SDK but the increased setup time and lack of code completion makes it not a contender in my situation. 回答1: If code completion and ease of setup are primary concerns, then I

How can I watermark a DateField control in Flex 4?

做~自己de王妃 提交于 2019-12-12 04:35:13
问题 I would like to know how to make a DateField control with a watermark. I want to set the prompt/watermark text from MXML like this one: <mx:DateField id="id_date" propmt="Select date" /> 回答1: Use this <mx:DateField id="df" text="Select Date" focusIn="df.text=''" /> OR Refer This Blog for custom datefield component WaterMarkDateField 回答2: Its Quite Simple by using the creation complete handler <mx:DateField id="sample" creationComplete="sample_creationCompleteHandler(event)"/> set the sample

Flex Air - HTTPService TimeOut every time

别来无恙 提交于 2019-12-12 04:34:02
问题 On my AIR app, i use HTTPservice with PHP. PHP side : set_time_limit(0) Air side : httpService.requestTimeout = 0 it doesn't work, with httpService.requestTimeout = 0, there is a time out after 30s. The FaultEvent is dispatched, while php is still running. The PHP script goes to the end without problems. So i changed to httpService.requestTimeout = 99999 . There is no longer time out after 30s but after 120s. And it's not the FaultEvent that is dispatched but the ResultEvent. And PHP is still

Show a threshold line in Flex Chart

感情迁移 提交于 2019-12-12 04:32:28
问题 I am stuck with a requirement to display a horizontal line on a ColumnChart to indicate a threshold level. I have the data to the Chart as an ArrayCollection . So my question here : Is it possible to get the location of a value that is shown on the y axis? I think I will be able to place a line or 1px high canvas on top of the Chart to achieve this. Or better, is there any built in functionality that i may have overlooked or is there some open library that can achieve something like this? 回答1

Problem while capturing ALT key event in flex

一世执手 提交于 2019-12-12 04:25:02
问题 I need to enable alt-<key> selection semantics for some Buttons in my application. If I write KeyDownEventListener for the Button, its not getting triggered when I press ALT key in the keyboard. Is there any way to enable alt key semantics for the buttons? Thanks in advance 回答1: KeyboadEvent class has an altKey property that you can use to check if Alt key was held-down while the current key was pressed. 来源: https://stackoverflow.com/questions/1789609/problem-while-capturing-alt-key-event-in

Flex collision testing with hitTestObject

徘徊边缘 提交于 2019-12-12 04:24:14
问题 I'm trying to test clipping on two canvases. Both canvases are 100px wide. They're 20px apart. I've placed a label inside one and made it 200px wide. Scroll bars will show up on the canvas. When I don't have the label inside and use hitTestObject it returns false. When I place the label inside it returns true. Is there any way to alter the canvas with the label inside so that it doesn't expand to the width of the label? <?xml version="1.0" encoding="utf-8"?> private function init() : void {

Resize flash object from the browser without flickering

☆樱花仙子☆ 提交于 2019-12-12 04:22:40
问题 I was wondering how to achieve the native scrollbar effect which TheFWA (thefwa.com) has managed to do pretty well (I am not a fan of Flex scrollbars). I found this post (http://stackoverflow.com/questions/318675/how-can-i-create-a-flex-application-with-dynamic-height), and implemented the technique, as I am calling a JS function through ExternalInterface every time, when the flash object changes size. This JS function simply resizes the div which holds the flash object, which creates the