apache-flex

How to get Flex components to fill available space using Actionscript

只谈情不闲聊 提交于 2019-12-13 18:31:09
问题 I was laying out my Flex components using mxml and had them working correctly. But then I wanted to switch them over to Actionscript because I wanted them to extend a base component that provides default functionality. I've go the code working except that my components that used to fill the entire space using width="100%" and height="100%" appear to display just using the default sizes. Do you know How I can get them to take up the entire space again? Here is a test component I am playing

Simple calculation problem with Flex

被刻印的时光 ゝ 提交于 2019-12-13 18:15:41
问题 Im having a trouble with the flex calculation, im trying to transform a pixel value to mm and reversing it. Starting out with 69.8: Calculating MM to pixel from: 69.8 mm 69.8*300 = 20940 20940 / 2.54 = 8244.094488188975 8244.094488188975 / 10 = 824.4094488188975 And calculating back: Calculating pixel to MM from: 824.4094488188975 824.4094488188975/300 = 2.7480314960629917 2.7480314960629917 * 2.54 = 6.979999999999999 6.979999999999999 * 10 = 69.79999999999998 We wanted 69.8 but ended up with

Flex 4.0/4.5 global error handling

狂风中的少年 提交于 2019-12-13 18:05:48
问题 I'm trying to use the new(ish) AS3 global error handling class. I am trying to use it within a Flex mxml application. I can't get it to work at all. Below is an entire program that shows the problem. I set this to use Flash Player 10.2 and compiled with the Flex 4.5 SDK. I've tried using Flex SDK 4.0 and 4.5 but I get the error in either case. I must be missing something obvious here. This is a normal Flex SWF file that will be shown on a web page. Assuming I could import the

Flex loitering objects with 0 paths

痞子三分冷 提交于 2019-12-13 17:48:19
问题 My application is leaking a visual component called GraphViewer. Every time the user changes graphs a new viewer is created and the old one is removed from the stage and discarded. Yet memory seems to leak. When I use the Flex profiler to track loitering objects it shows that GraphViewer instances indeed leak, but when I examine the object references of the loitering viewers I see that all of them (except one) have 0 paths to GC root. I take a memory snapshot after GC and then change the

Best way to dynamically load an xml configuration file into a Flex4/Flash movie at runtime?

家住魔仙堡 提交于 2019-12-13 17:07:21
问题 I've got a rather simple question about loading in an xml file at runtime in a SWF. I've found a couple different methods to load in the xml. myXml.load("file.xml"); HTTPService object URLStream object What is better way to load an xml file that always has the same name and is located in the same folder as the SWF on the web server? 回答1: I would use URLLoader - I think that's the most lightweight one. The complexity of URLStream is unnecessary as far as a configuration file is concerned.

Fastest way to get an Objects values in as3

一笑奈何 提交于 2019-12-13 16:46:08
问题 Ok, so I swear this question should be all over the place, but its not. I have a value object, inside are lots of getters/setters. It is not a dynamic class. And I desperately need to search an ArrayCollection filled with them. The search spans all fields, so and there are about 13 different types of VOs I'll be doing this with. I've tried ObjectUtil.toString() and that works fine and all but it's slow as hell. There are 20 properties to return and ObjectUtil.toString() adds a bunch of junk

How to remove row from datagrid?

泪湿孤枕 提交于 2019-12-13 16:23:30
问题 I have a datagrid from which I'd like be able to remove rows at will. Below is the component item renderer I'm putting together in order to achieve desired result, but there has to be a better way to access the data provider of the "parent" data grid. Anyone have any ideas/suggestions? <?xml version="1.0" encoding="utf-8"?> <s:MXDataGridItemRenderer xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" focusEnabled="true

Image map in Flex

对着背影说爱祢 提交于 2019-12-13 16:14:30
问题 Anyone have an example of doing something like an image map in Flex? I'm not sure if that is the correct term, since I also want to do things like highlight the selected part of the image or show a popup bubble pointing to it. Any ideas? 回答1: Check this out: flexlib > ImageMap 来源: https://stackoverflow.com/questions/535003/image-map-in-flex

Flex vs ActionScript

大城市里の小女人 提交于 2019-12-13 16:02:03
问题 I'm trying to build/implement a Flash video player to play videos. I have looked at Flex and built a basic application with just a VideoElement. It gets compiled to 41k without statically linking the libs and 300k with linking the libs. I generated the report but am still not sure why I would need all those components just to build a VideoPlayer. On the other hand, I have had a look at some implementations in ActionScript and it's compiled to 10K. Why is the file size so different in Flex

AS2 .swf loadmovie() and unloadmovie() fail when nested inside an AS3 .swf container

▼魔方 西西 提交于 2019-12-13 15:26:45
问题 I have an AS2 .swf being loaded as a child of a parent AS3 .swf. The AS2.swf calls loadmovie() and unloadmovie() to display 3 jpeg files. The images load the first time, but after that, a call to loadmovie() to replace the image, or a call to unloadmovie() fail. I found the following Adobe Bug report (https://bugs.adobe.com/jira/browse/ASC-3338?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel) that has said this has been resolved, and also said that child movieclips could be