flex4

Length of a string in pixels

孤人 提交于 2019-11-27 02:52:33
问题 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

Custom Preloader in Flex 4?

雨燕双飞 提交于 2019-11-27 02:01:12
问题 Has anyone successfully implemented a custom preloader in Flex 4? In my experience, when I specify a custom preloader using the preloader="com.foo.MyPreloader" in the Application tag, the preloader does not display until the SWF is completely downloaded, defeating the purpose of the preloader! Perhaps this is a bug in the still-beta Flex 4 framework? 回答1: I've been using this example in many Flex3 projects. It's still working with Flex4 sdk: I can remember where I get it from. And you are

Flex 4.5 - to long build process

♀尐吖头ヾ 提交于 2019-11-26 23:41:34
问题 We are developing an app using flex 4.5. The app runs just fine (no performance issues at all) but it takes us forever to compile and build it. A minor change, like just add a comment or press enter in an mxml file and rebuild takes about 3 minutes. You just cant work that way. It is a large project with about 1300 files. We also use Parsley as IOC container and a beat of cairngorm navigation. We also use Maven (Flex mojos) but I am talking about a normal eclipse build (Ctrl + B). We

AS3/Flex 4: Most Practical Way To Find Nested Children

送分小仙女□ 提交于 2019-11-26 22:07:43
问题 I'm sort of jumping in headfirst to some Flex/AIR stuff. I have a pretty solid background with AS3, but given the inherent hierarchal complexity of Flex (compared to regular Flash), I'm running into an issue. Let's assume that you have an app where pretty much everything is event driven (common). Accessing elements in the near vicinity of the event target, or the event target itself, is trivial. I'm trying to find, however, the most practical (read: best, most efficient) way to find children