flex4

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:

sortable grid like jquery ui in adobe flex

一曲冷凌霜 提交于 2020-01-17 04:14:26
问题 I need something like jQuery UI's Sortable in Adobe Flex. Is there a quick solution out there? 回答1: Here is similar sortable grid(3X3) example in flex: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle" horizontalAlign="center" height="100%" width="100%"> <mx:Script> <![CDATA[ import mx.containers.GridItem; import mx.controls.Button; import mx.core.DragSource; import mx.events.*; import mx.managers.DragManager; private var

Workers in Apache Flex 4.7

寵の児 提交于 2020-01-16 19:34:48
问题 has anyone been able to use Workers in AIR Application built with Flex 4.9.1 and AIR 3.7? I wanted to give it a try for a project, but as soon as I include/setup the worker like in the tutorial made by Lee Brimelow, my Application "freezes". Which means: It does not start. The compiler compiles, I get the info-text in the console, but neither my window opens nor my does any of my events get fired. Ideas anyone :) ? 回答1: Quite simple solution. Simply add -swf-version=XX //XX must be >=17 as a

Workers in Apache Flex 4.7

一世执手 提交于 2020-01-16 19:33:08
问题 has anyone been able to use Workers in AIR Application built with Flex 4.9.1 and AIR 3.7? I wanted to give it a try for a project, but as soon as I include/setup the worker like in the tutorial made by Lee Brimelow, my Application "freezes". Which means: It does not start. The compiler compiles, I get the info-text in the console, but neither my window opens nor my does any of my events get fired. Ideas anyone :) ? 回答1: Quite simple solution. Simply add -swf-version=XX //XX must be >=17 as a

Workers in Apache Flex 4.7

﹥>﹥吖頭↗ 提交于 2020-01-16 19:33:07
问题 has anyone been able to use Workers in AIR Application built with Flex 4.9.1 and AIR 3.7? I wanted to give it a try for a project, but as soon as I include/setup the worker like in the tutorial made by Lee Brimelow, my Application "freezes". Which means: It does not start. The compiler compiles, I get the info-text in the console, but neither my window opens nor my does any of my events get fired. Ideas anyone :) ? 回答1: Quite simple solution. Simply add -swf-version=XX //XX must be >=17 as a

Embending images on CSS for an extended spark button (IconButton)

孤街浪徒 提交于 2020-01-16 18:25:12
问题 I have this IconButton: Class package extra { import spark.components.Button; import spark.primitives.BitmapImage; public class IconButton extends Button { private var _icon:Class; [SkinPart(required="false")] public var iconElement:BitmapImage; public function get icon():Class { return _icon; } public function set icon(val:Class):void { _icon = val; if (iconElement != null) { iconElement.source = _icon; } } override protected function partAdded(partName:String, instance:Object):void { super

Focus Manager bug in Scroller class

雨燕双飞 提交于 2020-01-16 08:27:06
问题 In the Scroller.as class line 2139 I'm getting the following error: TypeError: Error #1009: Cannot access a property or method of a null object reference. at spark.components::Scroller/focusInHandler()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Scroller.as:2139] at flash.display::Stage/set focus() From Scroller.as /** * @private * Listens for any focusIn events from descendants */ override protected function focusInHandler(event:FocusEvent):void { super.focusInHandler(event); /

Flex4: if I want different icons, should I create a skin class for each button?

佐手、 提交于 2020-01-15 12:11:11
问题 i have a sequence of buttons and each button has its own icon. I was wondering if I have to create a Spark skin file for each button in order to assign its icon. thanks 回答1: You don't have to create separate skins, you could make 1 skin and 1 class (that extends Button ) with a property you can set to determine which icon to draw based on the button. You can extend the button class like this package com.components { import spark.components.Button; //icons [Style(name="iconImg",type="*")]

Flex TextArea and TextInput on mobile not positioning correctly

纵饮孤独 提交于 2020-01-14 14:21:06
问题 I've had two issues when working with TextArea and TextInput on mobile components I don't know how to solve. The first is that the TextArea text does not position correctly and the second is that it overlaps other components. The issues occur when the TextArea is in a Scroller (or the soft keyboard activates and moves the TextArea position). You can see this if you add the code below to a mobile Application: <s:Scroller width="100%" height="100%" top="100" bottom="100"> <s:VGroup width="50%">

How to inherit states with mxml?

倖福魔咒の 提交于 2020-01-12 14:33:51
问题 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 <