flex4

Scrollbars in dropdownlist inside DataGrid itemEditor not working

本小妞迷上赌 提交于 2019-11-29 11:33:16
I have a DropDownList inside the itemEditor of my DataGrid. There are enough items in the DropDownList to justify scrollbars. You can see the scrollbars, and the mousewheel works fine. If you move the mouse over the scrollbars, they'll change appearance fine (mouseover is working). If you click on them, the DropDownList closes as if you'd clicked elsewhere in the data grid. There's a comment on the Adobe Forums that describe the same problem, but it is fairly old and has not been answered. I've been experimenting with custom skins hoping to find a way to trap the mouse event, but have been

Error migrating Flex 3 to Flex 4

☆樱花仙子☆ 提交于 2019-11-29 11:24:38
I imported my Flex 3 project to Flex 4 and removed all the errors and warnings listed in Flex 4 problem windows. I am having the following error in Flex 4 when launching my application. What could be the cause of this? Error: Compatibility version has already been read. at mx.core::FlexVersion$/set compatibilityVersion()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\FlexVersion.as:254] at mx.core::FlexVersion$/set compatibilityVersionString()[E:\dev\4.x\frameworks\projects\framework\src\mx\core\FlexVersion.as:301] at _Screen1Module_mx_core_FlexModuleFactory() Experts, please help me on

Adobe Flash Builder (flex4): addChild() is not available in this class.

陌路散爱 提交于 2019-11-29 09:04:07
问题 I want to load an swf into a flex 4 application in order to use its classes. var ldr:Loader=new Loader(); ldr.load(new URLRequest("file://path/to/fileswf")); ldr.contentLoaderInfo.addEventListener(Event.INIT, loaded); function loaded(evt:Event):void { addChild(ldr); } I receive the error: Error: addChild() is not available in this class. Instead, use addElement() or modify the skin, if you have one. at spark.components.supportClasses::SkinnableComponent/addChild()[E:\dev\gumbo_beta2

Flex 4: Setting Spark List height to its content height

杀马特。学长 韩版系。学妹 提交于 2019-11-29 03:42:46
How to set a Spark List height to the height of its content? Tried this: var lastRow:IVisualElement = myList.dataGroup.getElementAt(myList.dataGroup.numElements - 1); myList.height = lastRow.y + lastRow.height; It works in case of a single item, but lastRow is null in case of more items. In mxml you can do it like so: <s:List width="100%"> <s:layout> <s:VerticalLayout useVirtualLayout="false" requestedMinRowCount="1"/> </s:layout> </s:List> You set the requestedMinRowCount or the requestedRowCount in the layout inside the List . It got me before, too. Hope that helps. For TileList I did it

How to send PUT HTTP Request in Flex

为君一笑 提交于 2019-11-29 02:46:29
I want to send HTTP PUT Request on one URL to update that content of XML via using API. URL is like this: https://domainname.com/someurls/id.xml I want to update that content. But When I am sending this PUT request, I have seen that in Network Monitor of Flex 4, Its going as the POST request on this web, while I am setting method as PUT in HTTPService variable. So I am getting error. So is there any way to send the PUT request on the web ? Or Is there any special header to set PUT method ? I have tried method header but its not working.... Please help me..... I have found the solution to send

Scroll to selected item in Flex 4 Spark List component

北城以北 提交于 2019-11-29 01:06:18
I'm setting selected element in s:List component with Actionscript, it works, but List doesn't scroll to selected item -- need to scroll with scrollbar or mouse. Is it possible to auto-scroll to selected item ? Thanks ! an0nym0usc0ward Try the s:List method ensureIndexIsVisible(index:int):void . For Spark: list.ensureIndexIsVisible(index); This function will scroll to the top of the list in Flex 4+. It takes in account the height of the item, so it will work for lists with different items with different height. private function scrollToIndex(list:List,index:int):void { if (!list.layout) return

Any Flex 4 migration experience?

↘锁芯ラ 提交于 2019-11-28 17:59:09
My current development stack is MySQL + iBatis + Spring + Spring BlazeDS Integration 1.01 + BlazeDS 3.2 and Flex 3 with Mate 0.8.9 framework. Now Flash Builder 4 beta 2 is out. There are cool features like Data Centric Development (DCD), form generation etc... Do you know how Spring Blazeds Integration works with BlazeDS 4? What about Mate? Is there any issues with Flex 4 ? How DCD suits with mate eventmaps. I know it is better to try it out myself but I just want to check if somebody ever tried to migrate Flex 4. If so what are the issues? Did you notice any productivity speed up? Thanks.

Preventing the bounding box of transparent Bitmap Sprite from triggering mouse events

好久不见. 提交于 2019-11-28 12:59:02
问题 I thought I had solved my mouseEvent problem for Sprites containing a Bitmap with an alpha channel but I've encountered a new issue shown in the image below: the bounding box of the "Eurasia" map Sprite is triggering a `MouseEvent.Roll_Out" for the "Africa" Sprite. My setup: Each map piece is a Sprite with a child Bitmap (PNG with alpha) and a "hitArea" Sprite derived from the Bitmap. The relevant code is below. This works great – except in the case where there are bounding box overlaps. The

Spark effects: why is procedural code preferred over triggers?

蓝咒 提交于 2019-11-28 10:33:15
问题 In Flex 3, MX effects could be triggered like this: <mx:Resize id="myEffect" /> <mx:Button mouseDownEffect="{myEffect}" /> In Flex 4, Spark effects are triggered like this: protected function onClick(event:MouseEvent):void { resizeEffect.end(); resizeEffect.play(); } ... <s:Resize id="resize" /> ... <s:Button click="onClick(event)" /> What was the reason to use this less declarative and longer approach? I couldn't find the answer anywhere in the docs. (Two things to note: There might be small

Length of a string in pixels

独自空忆成欢 提交于 2019-11-28 09:22:15
I'm populating a dropDownList with arrayCollection of strings. I want the width of the drop down list control to match with the size (in pixels) of the longest string in the array collection. The problem I'm facing is: the font width of the strings in the collection are different e.g. 'W' looks wider than 'l'. So I estimated the width of a character to be 8 pixels but that's not pretty neat. If a string that has many 'W' and 'M' is encountered the estimation is wrong. So I want precise pixel width of strings. How can i get the exact length of a string in pixels?? My solution that estimates all