flex4

Flex 4 FileReference Issues With Firefox

梦想的初衷 提交于 2019-12-11 06:16:07
问题 I'm trying to perform a file upload using a FileReference from a Flex app running in Firefox 4. However when I attempt to call the upload() method, the Filereference throws an IOError with the following Error #2038: File I/O Error. URL: http://localhost:8080/admin/upload If I don't explicitly add a listener for the IOErrorEvent, then I get a Flash player popup stating SecurityError: Error #2000: No active security context. The request doens't even hit my server (I can verify by placing

flex: Editable Label Component

一个人想着一个人 提交于 2019-12-11 06:07:13
问题 I am trying to create an editable label in flex4. To do it I am extending the textfield class, so it contains a label control element. But I am failing to make a label visible, once the text field gets invisible. The code looks this way: package unimap.components { import spark.components.Label; import spark.components.TextInput; public class SmartTextInput extends TextInput { private var _label:Label; public function SmartTextInput() { super(); } public override function set editable(value

How to embed a lot of images using Actionscript 3

♀尐吖头ヾ 提交于 2019-12-11 04:52:22
问题 i would like to know what is the more practical way to embed many images using actionscript. Firstly, i don't want to download an image every time from the server, and then, i would like to change the number of images and/or their names. What do you propose for these requirements? ps: I have been alerted for the Embed tag but it seems a little inconvenient in its use as you have to declare a new class for each asset and instantiate the class separately. 回答1: Met the problem above, the

How to make an user defined Object Iterable in AS3

浪尽此生 提交于 2019-12-11 04:35:17
问题 I need to iterate through all the properties of an user defined object. How to make an Object Iterable in As3? (I want to use that in a for ... each loop). I tried to extend Proxy. But not sure what methods to implement for this. below is my class, [Bindable] public class XYZ extends Proxy { public var aggTerRedQty:String; public var aggNBPQtyUsrs:String; public var termAllocUnloadQty:String; public var effNomQty:String; public var termAllocSplitFirm:String; } Thanks 回答1: [Edit] I made a

Flex 4 transparent background problem?

▼魔方 西西 提交于 2019-12-11 04:25:54
问题 I have found several solutions for this,but non of those solutions work for me.Can someone help me with this please. here is my code : <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx" name="app_clock" minWidth="150" minHeight="150" width="150" height="150" backgroundAlpha="0.0"> <fx:Script> <![CDATA[ ]]> </fx:Script> <fx:Declarations> </fx:Declarations> <s

Flex 4: idleCounter seems to have changed - most online examples now broken!

雨燕双飞 提交于 2019-12-11 03:55:52
问题 I have what I THINK is a simple problem here. I'm calling a basic timer on login success, followed by setting up a couple handlers to refresh some data on a schedule. (I haven't pasted the timer handlers cause i don't think it matters what they do) Anyway, I'm trying to shut OFF those timed refreshes when the app is IDLE, but this: if (e.currentTarget.mx_internal::idleCounter > 15000) { Never gets triggered. I presume it's because of the different way Flex 4 is handling these objects, but I

Spark SkinnableComponent skinDestructionPolicy

霸气de小男生 提交于 2019-12-11 02:45:13
问题 As a part of trying to tackle a memory leak in our application, we discovered that for every SkinnableComponent , the skinDestructionPolicy is set to "never" by default. This means that when using static skin parts, the skin is forever detained in memory. Furthermore, the override of a partRemoved() in the host component will never be triggered. Hence, event listeners we add in the partAdded() override are not removed, which effectively causes views and skins to be kept in memory. When doing

AS3: Cast Variable as Dynamic Type

◇◆丶佛笑我妖孽 提交于 2019-12-11 01:49:21
问题 Is it possible to cast a variable as a type dynamically, where the type would be a variable of type Class ? Consider the following (invalid): var myClass:Class = MyClass; var myInstance:myClass = new myClass(); For context: I'm working in Flex (4) to create a modal manager that will control various aspects of creating modals (via PopUpManager ) and I'd like to keep it as minimal as possible. Components would be passed through the same functions, and rather than allowing any type of variable

flex swf app - looking for unload() or onClosing() exiting() function

一个人想着一个人 提交于 2019-12-10 22:41:03
问题 I upload my flex client-side swf app to some website that loads different swf's on it's site. So you see your application floating in that website. My app is Flex swf app and has onCreationComplete() that starts the flow of logic. Now I want to do cleanup state and save state in a shared object when the application unloads (or probably exiting event, or closing event..) So do we have any function that I can implement and the flash platform automatically calls that function when the swf is

Sort collection and sort remains in place when adding to collection?

可紊 提交于 2019-12-10 22:39:48
问题 When I get a collection back from the service tier, I create an ArrayCollection and apply a sort. When I add an item to the collection later on, the sort is still in place? It seems to be the case. I thought I was only sorting it once, not applying a sort that will stick??? Here is the method for adding an item: private function onAddNewClick():void { var fileTemplate:FileTemplateDetailDTO = new FileTemplateDetailDTO(); fileTemplate.fileTemplateId = 0; fileTemplate.fileTmpltDtlId = 0;