apache-flex

Trouble cloning an extended ByteArray

微笑、不失礼 提交于 2019-12-11 19:05:44
问题 I've extended the ByteArray class, like this: [RemoteClass(alias="MyByteArray")] public class MyByteArray extends ByteArray {} and cloned an instance of this class using ByteArray#readObject()/writeObject(). However, for some reason, the cloned object is an instance of ByteArray rather than MyByteArray. This is illustrated in the following example: registerClassAlias("MyByteArray", MyByteArray); var b1:MyByteArray = new MyByteArray(); var tmp:ByteArray = new ByteArray(); tmp.writeObject(b1);

blazesds consuming huge memory

半腔热情 提交于 2019-12-11 18:48:14
问题 BlazeDS 4 is used to communicate with Flex4.6. When flex client invokes a remote call on blazeds server, server returns an arrayList containing POJOs. Assuming each POJO mem size is 12 bytes, I am expecting the arrayList size to be 12*number of elements. However, I find that somewhere in blazeds, it is compounded multiple times. Assuming I add 200000 POJOs into the array list, I am expecting its size to be ~2MB. But, I could see through profilers, that JVM shoots up N times of original size

A question on capturing the button click event in ANOTHER mxml file

孤者浪人 提交于 2019-12-11 18:46:26
问题 this seems to be an interesting question to be discovered in Flex. I registered a very simple button event listener in A.mxml: <mx:Script><![CDATA[ import mx.controls.Alert; public function Handler():void { Alert.show('click event occured'); } ]]></mx:Script> <mx:Button label="{resourceManager.getString('resources', 'button.startLab')}" id="nextStepButton" click="Handler()" /> It works fine when clicking the button everytime. Now I want to have something interesting,that is,I want to capture

How do I keep my mobile AIR application on landscape mode?

自作多情 提交于 2019-12-11 18:36:48
问题 I can't seem to find any way to force it to go landscape mode all the time. When I go to MyApp-app.xml and edit the <aspectRatio></aspectRatio> tags to landscape , only the main view is landscaped. If I navigate to the second view, it turns back to portrait . Any help? 回答1: You can set it on Properties of the Document. Go to File>Publish Settings> Click on Configuration Player ("Air for Android", "Air for iOS", "Flash Player 11", etc). Now, mark the "Auto Orietation". Like this: Now, save,

Get changed value of Item from ItemRenderer in List

泪湿孤枕 提交于 2019-12-11 18:25:46
问题 I have a List with textInput as itemrenderer. Initially the list is loaded with data from a data provider. However since the items are rendered in textInputs, I have the ability to change the value of a particular item. But when trying to access the value of the changed item using the function below, I still get the old value in my trace: private function addItem(event:Event):void { trace(myDataProvider.getItemAt(myList.selectedIndex).label); } can someone tell me what I need to do for the

How can I read a spark TextArea implicit line breaks?

僤鯓⒐⒋嵵緔 提交于 2019-12-11 18:25:19
问题 I have a TextArea where the user can enter text and also change the width and height of the TextArea. When resizing, the text is breaking where expected. I need to find where the TextArea skin added the implicit line breaks after resizing. ENVIRONMENT FlexBuilder 4.6 Flex SDK 4.6.0 Flash Player 11.1 EXAMPLE This is just plain text that breaks after the word "that". Any ideas on how to find the position of the line break when the TextArea lineBreak property is toFit and the text has no CR or

Action Message Format vs downloading XML files?

 ̄綄美尐妖づ 提交于 2019-12-11 18:15:44
问题 As we are about to start downloading big data from the server, we have two options to work with: Downloading compressed XML file each 10 seconds, where we will store data to be consumed at the client site. Calling Zend AMF Server each 10 seconds, and listening to methods callback results, it will return data that we will be consuming at client side. ( inspired by Zend AMF – AS3 and PHP ) Which approach will be faster? and which approach will save us bandwidth? Any recommendation? 回答1: AMF

Flex textArea remove/replace invalid little squares

半腔热情 提交于 2019-12-11 18:15:02
问题 This is related to my previous Flex issue: Flex TextArea - copy/paste from Word - Invalid unicode characters on xml parsing But this is slightly different & seems to be the issue. So I had to create another thread for this. When I copy/paste text from word to a text area, I do not see any invalid characters. But when I pasted the same text on this url: http://blog.flexexamples.com/2008/03/07/preventing-line-feeds-in-a-textarea-control-in-flex/ I'm seeing a little square " ". Please paste this

Flex - How to pass parameters to a swf

依然范特西╮ 提交于 2019-12-11 18:10:11
问题 I am using FlashVars to pass params in the swf but it is not working. Here is the html code: <noscript> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%" id="tpc"> <param name="movie" value="tpc.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="true" /> <param name=FlashVars value="myVariable=Hello%20World&mySecondVariable

How do I use data from the main window in a sub-window?

陌路散爱 提交于 2019-12-11 18:08:58
问题 I've just started working on a photo viewer type desktop AIR app with Flex. From the main window I can launch sub-windows, but in these sub-windows I can't seem to access the data I collected in the main window. How can I access this data? Or, how can I send this data to the sub-window on creation? It doesn't need to be dynamically linked. myMain.mxml <?xml version="1.0" encoding="utf-8"?> <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex