flex4

Does Flash Builder 4 now use AIR 2?

你。 提交于 2019-12-05 02:25:45
问题 I just got CS5 master suite which includes Flash Builder 4 and Flash CS5 Pro. When I create a new AIR app in CS5 pro it says "AIR 2" but when I create a new AIR project in Flash Builder I do not see anything indicating that it is AIR 2 or 1.5? Is there a way to tell which AIR runtime it is using? 回答1: I think you'll have to download the SDK and st it up yourself; but Flash Builder should work fine: http://labs.adobe.com/wiki/index.php/AIR_2:Release_Notes How to overlay the Adobe AIR SDK for

Disable Flex CSS type selector warning?

旧巷老猫 提交于 2019-12-04 23:33:17
I'm building a somewhat large Flex project that includes several modules (a single Flex project that produces multiple SWFs) Right now, I have a single css file, being loaded in the main SWF tag: <s:Application ... > <fx:Style source="css/main.css" /> ... </s:Application> In the CSS file: /* CSS file */ @namespace s "library://ns.adobe.com/flex/spark"; s|Panel { skinClass: ClassReference("com.skins.DefaultPanelSkin"); } s|Button { skinClass: ClassReference("com.skins.DefaultButtonSkin"); } The CSS file is not referenced anywhere else. I have currently 6 modules (plus the main SWF, a total of 7

changin the default width and height of the dropdownlist

依然范特西╮ 提交于 2019-12-04 19:56:56
i want a dropdownlist that is wide enough to accommodate the larger item in the dropdown in display area of the main control.(.i.e. dropdownlist with the functionality of MX Combobox) please guide me on this . You should create custom DropDownList (extending original) and override dataProvider setter and measure() method. In dataProvider setter you should invoke invalidateSize() and in measure you should iterate your data provider and find the largest label (you can assign new text to the label and compare their width). This will adjust the width of the drop down to the width of the data. I

flex 4 list ItemRenderer: how can i have different itemrenderers for different rows?

左心房为你撑大大i 提交于 2019-12-04 19:41:09
I'm creating a list of scores for a game. now most of the list i need to have the same ItemRenderer. but in one specific row of the list where the user who's playing is listed, it should show different information and with different background color. how can i achieve this ? update I already tried to resolve the issue with states, i created 2 states, one state called 'mine' and the 2nd state called 'others'. the problems that i got is that when users click on one of the list rows that state changes to i donno.. clicked or something and that's why i assumed that states are not the right action

Adobe Air - Detect if connection is WIFI, 3G, or EDGE

核能气质少年 提交于 2019-12-04 19:09:32
问题 I need to determine which connection type a device is using. Distinguishing between WIFI and 3G doesn't seem to be a problem on iOS (using the NetworkInfo ANE) and Android (using the native NetworkInfo class) but I've got no clue how to further distinguish between a fast (3G, 4G) and slow (EDGE) connection. Is there a way to do this with Adobe Air? 回答1: Try this for detecting Mobile vs. Wifi on iOS. This requires the Adobe native extension "NetworkInfo" import com.adobe.nativeExtensions

Flex 4 Scroller

好久不见. 提交于 2019-12-04 17:45:48
问题 Within my application I'm using a Scroller component. I can't seem to figure out which event I should set up a listener on in order to know when content is scrolled. I tried Event.CHANGE on Scroller.verticalScrollBar property but apparently that event doesn't fire when the user scrolls with a mouse wheel or arrow keys. 回答1: You can listen for the propertyChange event on the viewport of the Scroller. Here is an application that demonstrates how this might be done: <s:Application xmlns:fx="http

Label word wrap in Flex 4

江枫思渺然 提交于 2019-12-04 17:36:22
How can the text in a Label control (or a similar control) be wrapped in Flex 4 beta? In Flex 3 I could use the Text control but this is no longer available in Flex 4. You can use maxDisplayedLines and lineBreak properties with spark Label component: <s:Label maxDisplayedLines="{-1}" lineBreak="toFit" text="...." /> It works with Flex 4.5. Try <s:SimpleText /> . From the excellent Migration Guide (p. 75): The lightest-weight component of the text primitives. The SimpleText class supports the least number of text features. This class is similar to the Label class, except that it supports

What are good memory management techniques in Flash/as3

十年热恋 提交于 2019-12-04 12:08:07
So I am pretty familiar with memory management in Java, C and C++; however, in flash what constructs are there for memory management? I assume flash has a sort of virtual machine like java, and I have been assuming that things get garbage collected when they are set to null. I am not sure if this is actually the case though. Also is there a way to force garbage collection in Flash? Any other tips? Thanks Flash bytecode is run by the AVM (Actionscript Virtual Machine). In general terms (and without being an expert in Java or the internals of the Flash Player), I think it's safe to say that the

How to inherit states with mxml?

梦想与她 提交于 2019-12-04 02:41:11
I have the following panel component called AdvancedPanel with controlBarContent: <!-- AdvancedPanel.mxml --> <s:Panel> <s:states> <s:State name="normal" /> <s:State name="edit" /> </s:states> <s:controlBarContent> <s:Button includeIn="edit" label="Show in edit" /> <s:Button label="Go to edit" click="{currentState='edit'}" /> </s:controlBarContent> </s:Panel> I created a second panel, called CustomAdvancedPanel based on the AdvancedPanel since I don't want to redeclare the controlBarContent <!-- CustomAdvancedPanel.mxml --> <local:AdvancedPanel> <s:Button includeIn="edit" label="Extra edit