flex4

Flex 4 TLF and embedded font loaded as a module not working

两盒软妹~` 提交于 2019-12-25 01:47:12
问题 this problem is really killing me so any help will be really great :) I have a flex 4 application that loads a flex module. In this module I 'register' a bunch of fonts. I have a Spark textArea in this module that wants to use one of these fonts via its text flow which is created using: textArea.textFlow = TextConverter.importToFlow(htmlText, TextConverter.TEXT_FIELD_HTML_FORMAT); I 'register' the font using: [Embed(source='/assets/fonts/book/HogarthScrD-Regular.ttf', embedAsCFF="true"

Adding an image on the right side of the title bar of a panel in Flex 4

社会主义新天地 提交于 2019-12-25 00:49:14
问题 I'm trying to create a MXML component based on the spark Panel and I would like to add an image on the right end of the title bar, so that the panel will have a text on the title bar and a small image at the right end. I'm using a skin to define the colors, background fill etc. But how do I add this image at the right end of the title bar? I would like to make that image cutomizable so that when the component is inserted, either the default image is used or a new image can be provided. Please

Flex: Looking for design pattern to display busy cursor while my app is “busy”

筅森魡賤 提交于 2019-12-25 00:25:08
问题 I have a Flex 4 app that now and then needs to do a lot of processing, which causes a user to wait a few seconds for it to complete. I know Flex allows one to set and remove busy cursors via the cursor manager. I'm using it as follows: CursorManager.setBusyCursor(); // add busy cursor // execute lengthy processing here; e.g. switch to a new screen with a lot of layout CursorManager.removeBusyCursor(); // remove busy cursor However, in practice, for certain situations, the busy cursor doesn't

how to use mxml component in another actionscript

岁酱吖の 提交于 2019-12-25 00:13:18
问题 how to use mxml component in another mxml component actionscript code for ex. in my main mxml file private var warningMessage:Warning;//this is variable if (!_controller.flashVars.chatSession || _controller.flashVars.chatSession == "") { warningMessage.includeInLayout = true; warningMessage.visible = true; } else { _controller.flashVars.showWarningMessage = "2"; } private var warningMessage:Warning; (warning is external custom component) warningMessage.visible=true (and i want use it like

Menu attached to mx.controls.PopUpButton never changes

泄露秘密 提交于 2019-12-24 23:29:56
问题 I have prepared a very simple test case to demo my problem. Please just place the 2 files below into a Flash Builder 4.6 project and they will run instantly. My problem is that the menu attached to my (slightly modified) custom PopUpButton never changes - even though the underlying Array data provider is changed when you click one of the 3 buttons on the right side of it: AuxButtonTest.mxml: <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s

override public function initialize() error in flex

天涯浪子 提交于 2019-12-24 17:29:26
问题 i want to know what i should put befor .mx_internal override public function initialize() : void { var target:DialogButtons; var watcherSetupUtilClass:Object; .mx_internal::setDocumentDescriptor(_documentDescriptor_); var bindings:* = _DialogButtons_bindingsSetup(); var watchers:Array; target; if (_watcherSetupUtil == null) { watcherSetupUtilClass = getDefinitionByName("_components_DialogButtonsWatcherSetupUtil"); var obj1:* = watcherSetupUtilClass; obj1.watcherSetupUtilClass["init"](null); }

flex 4 title window + custom component + skin problem!

白昼怎懂夜的黑 提交于 2019-12-24 16:17:02
问题 I'm trying to put my components in a window container that can be closed by "x" moved on the stage, resized and so on. And I wonder which is the best way to do it. I want to use a skin class and the component class. The "solution" that is not working looks like this: take a look at this and if you have a better idea on how to implement this, you are welcome. (: thanks a lot! I have in the main app: // imports... public function init():void { // runs on creationComplete event PopUpManager

Can I use multiple ItemRenderer with one LineSeries?

最后都变了- 提交于 2019-12-24 13:25:14
问题 Currently I have created below class which extends ItemRenderer to add labels for all data points in Line Chart. package lib { public class LineChartLabelRenderer extends UIComponent implements IDataRenderer, IFactory { private var _label:Label; public var solidColor:SolidColor; public function newInstance():* { return new LineChartLabelRenderer(); } public function LineChartLabelRenderer():void { super(); _label = new Label(); addChild(_label); _label.setStyle("color",0x000000); _label

Flex, any way to programmatically highlight a field in red the way the validators do?

守給你的承諾、 提交于 2019-12-24 12:33:56
问题 I'm doing some programmatic validation of some field values in a form, is there any way in Actionscript to highlight the field in red the way the validators do? 回答1: you just need to set errorString property on programmatic validation error <s:TextInput errorString="error string value" /> <mx:TextInput errorString="error string value" /> 回答2: Using: var textField:TextField = new TextField(); addChild(textField); To highlight the background in AS3: textField.background = true; textField

Using a button within flash movie in flex/flash builder

泪湿孤枕 提交于 2019-12-24 12:13:54
问题 Is it possible to build a UI with Flash CS5 that contains multiple buttons, and then have flex listen to those button events? My current plan is to load the SWF with SWFLoader and attaching listeners to the buttons in a onComplete event would be the proper way to set it up, however i cannot seem to find a way to access the buttons themselves and attach listeners to them. Of course i would give each button its own instance name. Pointers and/or examples would be greatly appreciated. 回答1: Once