flex3

Adobe AIR applications slow response after idle time

蓝咒 提交于 2019-12-06 03:06:47
问题 I spent hundreds of ours developing an Adobe AIR Application with Flex 4.0 and now I thought I should have finished, but after letting the application run for more than a few hours the UI-responsiveness begins to lack... What I do: My application uses custom chromes by setting backgroundImages with transparency to BorderContainers within Window-modules. I open up many different popups, which all are based on the Window-Class (not TitleWindow!) and created and closed dynamically in

ActionScript: Package-level introspection? Or some other pluggable loading scheme?

我的未来我决定 提交于 2019-12-05 21:35:30
I'm coding up some delicious business logic and I've come to a situation like this: There are a bunch of rules ( ruleA , ruleB , etc...) which all follow a standard pattern. I've created a Rule interface, and implemented it in RuleA , RuleB , and so on. So now I just need a way to load them. Right now I'm using a map: var rules:Object = { ruleA: new RuleA(), ruleB: new RuleB(), ... }; Then calling it like this: function doStuff(whichRule:String, someData:Object):* { return rules[whichRule].applyTo(someData); } Now, the rules follow a standard naming scheme, and they are all part of one package

Flex - Custom Component - Percentage Width/Height

放肆的年华 提交于 2019-12-05 14:44:05
I am trying to create a Custom Flex Component using the Flex Component framework: http://www.adobe.com/livedocs/flex/3/html/help.html?content=ascomponents_advanced_3.html . All good components allow you to define their dimensions using percentage values using: MXML: TextInput width="100%" or Actionscript at runtime: textinp.percentWidth = 100; My question is how do you implement percentage width/height in the measure() method of your custom component? More specifically, these percentages are converted to pixels values at some stage, how is this done? The way Flex layouting works is by letting

Flex: Basic expectations from a flex(actionscript) developer

别等时光非礼了梦想. 提交于 2019-12-05 08:27:37
问题 Knowledge has no limits but still in your opions, what are the basic requirements for an individual, where he can call himself a flex developer. To make it a bit concrete lets say after having a 2-3 years experience. In my perspective it should be something like below. It is a very (very) rough idea and please let me know your views and suggestions on this. BASIC: (1) Knowldge about basic GUI components like tab, vbox, etc. Their properties and the ability to decide which component suits

Is it possible to do a #define in Adobe Flex?

谁说胖子不能爱 提交于 2019-12-05 06:57:29
I'm looking for a way to do something similar to a c/c++ #define in adobe flex. I'd like to have lots of different paths a project build can take depending on wither or not something was defined. Does such a thing exist in flex? I know there is ways to set global variables but that wont really suit my purpose. being able to have structures with numerous #ifndefined and such is really what i'm in need of. thanks! Actually MXMLC (the compiler in the Flex SDK) does support some limited preprocessor features. You can use them to pass in constant values, or to simulate #ifdef / #ifndef type

How to sort an ArrayCollection in Flex

柔情痞子 提交于 2019-12-05 06:05:26
I want to sort an Arraycollection by fieldName as ascending. Here's my code and I want to know whether it's right. Do you have any suggestions? public static function arrayCollectionSort(ar:ArrayCollection, fieldName:String, isNumeric:Boolean):void {var dataSortField:SortField = new SortField(); dataSortField.name = fieldName; dataSortField.numeric = isNumeric; var numericDataSort:Sort = new Sort(); numericDataSort.fields = [dataSortField]; arrCol.sort = numericDataSort; arrCol.refresh();} Sagar Rawal The code you have is correct, except for a type. arrCol should be ar . The code looks almost

Flex: Caching images in list item renderer?

天涯浪子 提交于 2019-12-05 04:54:01
I have a List and the item renderer displays an image. Whenever you scroll the list, and the item renderer refreshes, it redownloads the image. Causing there to always be a delay. Is there some way of caching it so it doesn't have to redownload every time causing a delay in showing the image every time you scroll the list? Thanks! Here is nice solution with source code http://demo.quietlyscheming.com/superImage/app.html You'll have to implement your own caching. I would store all the images that have been previously downloaded and load them if the user goes back to them. I remember doing this

Flex equivalent of Google Visualization Geomap (choropleth map)?

耗尽温柔 提交于 2019-12-05 01:36:55
问题 The Google Visualization Geomap component is a choropleth map of continents, countries and regions, with colors and values assigned to specific regions. Although it is rendered with Flash, it can only be accessed and customized via JavaScript or GWT API. Does anyone know an alternative Flash/Flex component that I could easily embed into Flex 3 applications (using AS3) ? 回答1: I've had previous success in a non-Flex project using amMap's non Flex maps, but they do offer a Flex mapping product.

Positioning Flex/AIR Desktop App Window to the bottom right corner

此生再无相见时 提交于 2019-12-04 18:08:45
Any clues how this can be achieved? It needs to work on all resolutions .. is there any parent/stage object available to find out the resolution of the system? public function init():void { nativeWindow.x = ( Screen.mainScreen.bounds.width - 300 ) nativeWindow.y = ( Screen.mainScreen.bounds.height - 65 ) } This is a 300x65 window positioned in the bottom right. You are looking for Screen . Screen.mainScreen.visibleBounds takes the taskbar into account Another option is to create a transparent window, then maximise it, then position your window inside the transparent one, using standard bottom

ActionScript event handler execution order

怎甘沉沦 提交于 2019-12-04 15:24:50
问题 I have been trying to understand the way ActionScript's events are implemented, but I'm stuck. I know that AS is single threaded, which means that only one event handler will be executing at a time, and also means that handlers will be executed in a deterministic order*. For example, consider the following code: 1: var x = {executed: false}; 2: foo.addEventListener("execute", function(){ x.executed = true; }); 3: foo.dispatchEvent(new Event("execute")); 4: assert(x.executed); If ActionScript