mxml

Howto removeEventListener with <mx:SetEventHandler />?

不想你离开。 提交于 2019-12-25 00:08:10
问题 I'm trying to remove an eventlistener on (in this specific case) a HorizontalList. The list is initialized with the property itemRollOver="playPreview(event)" I'd like to remove this eventListener by switching state and stating something like: <mx:SetEventHandler target="{horList}" name="itemRollOver" handlerFunction="null" /> This doesn't seem to work. The event is still handled and playPreview(event:ListEvent) is still called. How to properly do this? (I know I can do it in Actionscript,

how to send Java object into between two mxml files in java?

白昼怎懂夜的黑 提交于 2019-12-24 21:15:13
问题 I'm Using Flex + java .. in that i have two Sub mxml files Sub1.mxml and Sub2.mxml Sub1.mxml code.. [Bindable] private var editTimetableVO:TimetableVO; public function forwardToCreateEvent(event:MouseEvent):void { editTimetableVO = new TimetableVO(); editTimetableVO=editDataGrid.selectedItem as TimetableVO;//editDataGrid is DataGrid id Alert.show("value "+editTimetableVO.startDate); } Hear Alert is Print some date it is good... then my Second Mxml file.. Sub2.mxml code.. public var

Flex: Custom Item Renderer For Combobox controls truncates text

偶尔善良 提交于 2019-12-24 10:31:25
问题 I've implemented a custom item renderer that I'm using with a combobox on a flex project I'm working on. It displays and icon and some text for each item. The only problem is that when the text is long the width of the menu is not being adjusted properly and the text is being truncated when displayed. I've tried tweaking all of the obvious properties to alleviate this problem but have not had any success. Does anyone know how to make the combobox menu width scale appropriately to whatever

Problem with handling keyboard events inside a Canvas using Flex

匆匆过客 提交于 2019-12-24 06:04:29
问题 For some reason, the event listener I define never seems to receive any events, although I believe it should. Here's a very short description of the MXML code I'm using: WindowedApplication VBox (root box) MenuBar TabNavigator VBox (first tab) Canvas VBox (second tab) If I add a listener for KEY_DOWN events to WindowedApplication or the root VBox, the handler receives the events just fine. But if I add the listener to the Canvas or the first tab VBox, the handler never seems to receive any.

How to load flex swf from flash?

混江龙づ霸主 提交于 2019-12-23 17:41:11
问题 I have some swf compiled in flex I want to load it into my movie clip in flash pro. ...So how to for example load flex swf inside Flash CS4? how to do such thing? 回答1: Here you can read more about it: http://troygilbert.com/2009/05/loading-flex-based-swfs-in-as3-only-swfs/ Here is the code for loading the flex swf: var loader:Loader = new Loader(); addChild(loader); loader.load(new URLRequest("my-flex-app.swf")); loader.addEventListener("mx.managers.SystemManager.isBootstrapRoot",

how do I call a customcomponent with added functionality in flex

前提是你 提交于 2019-12-23 04:57:05
问题 I have created a custom component (named customtitlewindow) the code of which is as follows: <?xml version="1.0" encoding="utf-8"?> <mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" layout="vertical" width="400" height="300" xmlns:comp="components.*" showCloseButton="true" keyDown="detectescapekeypress(event)" creationComplete="this.setFocus();" close="PopUpManager.removePopUp(this);" paddingTop="40">

What overhead is there of using an MXML file in Flex vs. a plain actionscript class?

时光怂恿深爱的人放手 提交于 2019-12-23 02:01:57
问题 I find it much easier to write MXML classes with embedded Script than trying to make an actionscript file. I was wondering however what kind of overhead there is of using an MXML file - in terms of file size. I'm not especially concerned about performance, but if that is relevant would be interested in any findings. Obviously I'm talking about UI components that have layout. MXML is MUCH easier to visualize and modify but I'm unclear exactly what it compiles down too. I'm hoping there is a

How to get response header using ActionScript? (Flash)

守給你的承諾、 提交于 2019-12-22 12:23:47
问题 So... I have a URL like www.example.com/stream/ I need to make any request to this url and get Http Rewspons header (like this one: HTTP/1.0 200 OK Content-type: video/x-flv Cache-Control: no-cache I do not need reponse body at all. After I get header need to emmidiatly close connection to that url (so stop to obtain data from it) How to do such thing (I use Flash builder) 回答1: Aparently, that's possible in AIR (I've never tried it): http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3

Assigning an array of objects to a DataGrid

大憨熊 提交于 2019-12-22 00:59:33
问题 When the dataProvider for an DataGrid is an array of objects, how do I set each column's dataField to a property of the object. I have an ArrayCollection (say a) where each item is an object For example a[i] = data:Object Where the object data has some subproperties - data.name , data.title , data.content etc. I have a DataGrid in which I want to display this data. So I put: <mx:DataGrid id="entries" dataProvider="{resultRSS}"> <mx:columns> <mx:Array> <mx:DataGridColumn headerText="Title"

Adding mouseOver/mouseDown/mouseUp/etc. to custom MXML component

╄→гoц情女王★ 提交于 2019-12-21 22:03:46
问题 I'm new to Flex and am porting a pure Flash/AS3 app to Flex 4.5 I've created a custom MXML component based on BorderContainer <?xml version="1.0" encoding="utf-8"?> <s:BorderContainer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" width="160" height="140" > <s:Image id="_avatar" enableLoadingState="true" x="0" y="0" width="160" height="120" /> <s:Label id="_username" x="0" y="125" fontSize="12" fontWeight="bold" /