flex3

Changing tab border color at run time in flex

╄→尐↘猪︶ㄣ 提交于 2019-12-25 01:34:00
问题 How can I change border color of tab in tab navigator control at runtime? I am trying to access it with its id "mytab" and update it's style. this.mytab.setStyle("bordercolor","red"); A TabNavigator has multiple tabs and I have to change style of few tabs based on some logic. StyleDeclaration is applicable for all the tabs under tab navigoter but how can use CSSStyleDeclaration based on componentid? The only shortfall with this approach is that Style can not be changed for individual tab. 回答1

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

Runtime Shared Libraries

戏子无情 提交于 2019-12-24 22:00:01
问题 What is RSL and what is the use of RSL? Have any sample example , Please shared me,. Thanks, Ravi 回答1: Runtime shared libraries RSLs are just SWF files whose code is used as a shared library between different application SWF files. There are two kinds of RSLs, signed and unsigned. Signed RSLs are libraries that are signed by Adobe and may be stored in the Flash Player Cache, which can be accessed by applications from any domain. This means if your application is using a signed RSL, the RSL

Flex: Special-casing an item in a list or menu?

◇◆丶佛笑我妖孽 提交于 2019-12-24 18:16:06
问题 I've found it's often useful to special case the first item in a drop-down menu (ie, an instance of Menu). For example, if I want to pick a color from the list provided by a web service: <mx:PopUpMenuButton id="colorSelelector" dataProvider="{colorsService.lastResult}" /> I might also want a special-case, which is "enter a new color", allowing the user to enter the RGB values for a new color which isn't in the list. For example: var newColor = { label: "Enter a new color", rgb: null }; Then

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); }

Calling Application.application.enable from a TitleWindow in a different mxml component

自古美人都是妖i 提交于 2019-12-24 16:19:50
问题 Good day. I have a Flex RIA App, and in the application tag there is a button when its pressed calls upon a TitleWindow from another .mxml file, and sets application.enable = false That way the user cant use any of the components in the application, and still can use the components in the TitleWindow. The problem its. When the TitleWindow is close i want him to restore the application back to application.enable = true Wich enables the application once again. But i can't call that code from

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

Serialize Flex Objects to Save/Restore Application State

烂漫一生 提交于 2019-12-24 12:17:12
问题 Is it possible to serialize a hierarchy of objects in Flex, send the binary data to a URL for storage/retrieval on/from a server, and deserialize the data to restore the objects' original state? I know it's possible to convert the objects into an XML format (haven't tried it yet), but I'm hoping to avoid parsing XML and rebuilding the objects manually. It would be nice to have functionality which can serialize/deserialize objects to a simple binary format (I did something similar in the past

flex edit menu operations on multiple textareas

不打扰是莪最后的温柔 提交于 2019-12-24 11:37:28
问题 I have a grid in which one column is having itemrenderer as textarea. My application is menu controled. Now I want to perform edit operations on the textarea using menu items. Like if I select some text from a textarea in the grid, then I select a menu item "Cut" then it should cut the selected text from the textarea. In this manner I would lie to perform all operations. I am not getting how to get that the operation is to be performed on which textarea? 回答1: inside your menu item click

Flex DataGrid row color spreads when scrolled up down

女生的网名这么多〃 提交于 2019-12-24 08:39:44
问题 I'm facing issue with datagrid row background color being spread when datagrid is vertically scrolled. I'm assuming this is happening because ItemRenderers are recycled. Here's my code : <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" minWidth="955" minHeight="600" > <mx:Script> <![CDATA[ import mx.events.FlexEvent; private var rendererFactory:ClassFactory; protected function btn_clickHandler(event:MouseEvent):void {