flex3

Flex: Tree component: keeping state when data provider updates

£可爱£侵袭症+ 提交于 2020-01-05 16:24:27
问题 How would I go about keeping the state of a tree control? I'd like to keep the state of the tree when it's data provider gets updated, instead of it collapsing. 回答1: How about something like this : var openItems:Object = tree.openItems; tree.dataProvider = myNewDataProvider; tree.openItems = openItems; tree.validateNow(); I'm not sure how well this will work if the new dataProvider is radically different from the old one, but it works when you're lazy loading tree nodes. 回答2: Here is how I

Flex 3 DataGridColumn HeaderText Localization

拜拜、爱过 提交于 2020-01-05 06:17:12
问题 I'm working in a multi-language application using ResourceBundle in Flex 3. I'm displaying data in a DataGrid and defined DataGridColumn headerText like this headerText="{localizedHeaderText('LABEL_USER_NAME')} this function returns the localized label for the username, but when I dynamcally select another language evertying gets refreshed but the headerText labels? Any thoughts? Thanks 回答1: Unless you make the localizedHeaderText method bindable, the binding will never be re-evaluated since

Replacing ScrollPane Scrollbar with OS Native Scrollbar

北慕城南 提交于 2020-01-05 04:36:08
问题 Is there an easy way to replace the ScrollPane scrollbar with the OS's native scrollbar? Flash applications look much more integrated if they have the same skinning as the user's operating system -- which isn't always easy to detect (Vista Aero vs. Classic?). Have you guys come across any examples of Flash apps doing this? 回答1: To set up something like this would be a big and dirty job. If you're that concerned with OS look-and-feel integration, you're probably better off using native browser

Connecting lines (while dragging) in Flex/Actionscript

若如初见. 提交于 2020-01-04 17:29:48
问题 I have a mx:Canvas element that contains several mx:Panel elements. I want to be able to draw a line connecting two such mx:Panel's in such a way that the line continues to connect the two mx:Panels when one or both get dragged around. It seems like something that should be trivial to do, but I haven't been able to figure it out. In effect, this is the problem. alt text http://img150.imageshack.us/img150/5656/ishot1eu3.jpg Since the updates only occur when the Panel reaches it's final

Connecting lines (while dragging) in Flex/Actionscript

喜欢而已 提交于 2020-01-04 17:26:25
问题 I have a mx:Canvas element that contains several mx:Panel elements. I want to be able to draw a line connecting two such mx:Panel's in such a way that the line continues to connect the two mx:Panels when one or both get dragged around. It seems like something that should be trivial to do, but I haven't been able to figure it out. In effect, this is the problem. alt text http://img150.imageshack.us/img150/5656/ishot1eu3.jpg Since the updates only occur when the Panel reaches it's final

Is there a SVG to MXML Converter?

 ̄綄美尐妖づ 提交于 2020-01-03 01:45:39
问题 I'm trying to use an SVG file in my Flex app - but it seems the best way to do that is to convert it to MXML. However, I cannot find an SVG to MXML converter. There seem to be a number of SVG to XAML converters (for Silverlight/C#), but I can't find anything analogous for Flash/Flex. Any help would be appreciated. Thanks, Karthik 回答1: You should be able to Embed the SVG directly, without a converter. 回答2: yes, there are few libraries but i haven't come across any mature one- - http://code

Is there a SVG to MXML Converter?

时光总嘲笑我的痴心妄想 提交于 2020-01-03 01:45:19
问题 I'm trying to use an SVG file in my Flex app - but it seems the best way to do that is to convert it to MXML. However, I cannot find an SVG to MXML converter. There seem to be a number of SVG to XAML converters (for Silverlight/C#), but I can't find anything analogous for Flash/Flex. Any help would be appreciated. Thanks, Karthik 回答1: You should be able to Embed the SVG directly, without a converter. 回答2: yes, there are few libraries but i haven't come across any mature one- - http://code

Resize images in Flex using as3

跟風遠走 提交于 2020-01-02 21:51:07
问题 I am loading an image using a Loader. Once loaded, I can get the bitmap data using Bitmap(event.target.loader.content).bitmapData . However since the images I am loading are quite large (around 2000 x 1600), I would like to reduce the size and create a new smaller bitmap maybe 200 or 300 pixels wide, sort of like a thumbnail. I think it has to do with creating a new BitmapData with the new size. However I am not able to get that working properly. Any ideas? 回答1: Not tested, but this should

Canvas total width (visible width + hidden scrollable part)

≯℡__Kan透↙ 提交于 2020-01-02 20:25:29
问题 It's probably a no brainer, but I've spent the last 40 minutes or so looking for it to no avial. I have a Canvas control with a fixed width and a horizontal scrollbar. I'm trying to find the actual width of the control. The .width (fixed width) + the part being revealed by the scrollbar. I tried explicitWidth, width + maxHorizontalScrollPosition, and some other combos but non of them hit the spot. 回答1: Well as it seem width + maxHorizontalScrollPosition is indeed enough. The problem was with

Connecting any database directly from flex

徘徊边缘 提交于 2020-01-02 19:37:10
问题 Is it possible to connect any database from flex directly? 回答1: Not unless you use Adobe AIR for desktop at which time you'd be using the SQLLite api's to create/connect to a sqlite database file. http://livedocs.adobe.com/flex/3/html/help.html?content=SQL_01.html Anything else is going to require a back end service to handle such transactions. 回答2: You can use asSQL as mentioned by michael, or use the Adobe Air runtime. However, this must be said about using this library: It is EXTREMELY