apache-flex

How can i access a variable or change the state of an element(like tabNavigator) from one mxml to another mxml?

落花浮王杯 提交于 2020-01-17 04:33:06
问题 How can i access a variable or change the state of an element(like tabNavigator) from one mxml to another mxml in FLEX 4.6?? 回答1: Each separate MXML file should be viewed as a class, since that is what they are. In the theory of encapsulation; two classes should not directly access / change each others variables or state. They should use an API provided by the developer of the MXML Class. If MXML 1 is the parent of MXML 2; then MXML1 can pass data to MXML2 by setting public properties or

How to create HTML table like structure in flex

匆匆过客 提交于 2020-01-17 04:28:05
问题 The html table coding structure looks something like the code shown below <table> <tr> <td>Text</td> <td>input text field</td> </tr> <tr> <td></td> <td></td> </tr> <tr> <td>submit butto</td> </tr> </table> How to create such table structure in flex which has above given row and column format in flex application with the option of colspann and rowspan alternate too? 回答1: There are a lot of ways. I would probably start by looking into the Form layout container. That is great for a two column

sortable grid like jquery ui in adobe flex

一曲冷凌霜 提交于 2020-01-17 04:14:26
问题 I need something like jQuery UI's Sortable in Adobe Flex. Is there a quick solution out there? 回答1: Here is similar sortable grid(3X3) example in flex: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" verticalAlign="middle" horizontalAlign="center" height="100%" width="100%"> <mx:Script> <![CDATA[ import mx.containers.GridItem; import mx.controls.Button; import mx.core.DragSource; import mx.events.*; import mx.managers.DragManager; private var

“Invalid byte 1 of 1-byte UTF-8 sequence” error

99封情书 提交于 2020-01-17 03:27:25
问题 My error is: "Invalid byte 1 of 1-byte UTF-8 sequence". I am calling a Java method using Blaze DS. 回答1: Hi Nithi Make sure that "remoting-config.xml" destination id and source name are correct. 回答2: Your XML document has a BOM marker, because it was created with a Windows program. Java does not support this out of the box. Regarding BOM: http://www.unicode.org/faq/utf_bom.html So either make sure your XML Document has no BOM marker, (if it is your ds config file), or use something like this

Flex String to HTML for parse with DOM

纵饮孤独 提交于 2020-01-17 01:29:09
问题 I have a string: private str:String = ' <!DOCTYPE html> <html> <body> <div>TEST</div> <span id="t1">T1 Content</span> <span class="t2">T2 Content</span> </body> </html>'; I want to parse the string. Next, I get innerHTMl via Object, ID or Class. E.g.: Objects: Body, Div, Span IDs: t1 Classes: t2 In PHP with the class, it's easy. But I could not create this build with Flex. Thanks for help... 回答1: Convert it to native XML in as3, then use e4x to parse the information required: var xml:XML =

Using Maven to build Flex project including stylesheets

拥有回忆 提交于 2020-01-17 01:22:34
问题 Flex stylesheets are parsed by the compiler and bundled with their assets (graphics, usually) into a swf file, which can then be loaded at runtime. I've got a project with a fixed number of styles (currently 4: old corporate style, new corporate style, and high contrast versions of both). Using Flash Builder (Eclipse with Flex IDE plugin) I'm able to have all .css files compiled to .swf files alongside the primary project artifact .swf file. This is also possible with ant scripts. My current

how to add an attribute to an existing array dynamically in Flex

筅森魡賤 提交于 2020-01-16 19:38:29
问题 I have an 2D array as: Asia India 100 200 Asia China 200 300 I need to add an attribute named "state" with value false to this above array (internally) as an additional column to the above array where my output is : Asia India 100 200 state:false Asia China 200 300 state:false so that I can give the additional column's attribute name "state" to item renderer. How to get the same.?Is it possible? 回答1: For lines: var originalArray:Array = //your original array var newArray:Array = new Array();

Flex element includein

三世轮回 提交于 2020-01-16 19:31:49
问题 In Flex, we can assign state to an element via this: <s:Button id="mybtn" includeIn="mystate" label="button label"/> How can we do the includeIn with ActionScript? Thank you. 回答1: States are an MXML concept, not an AS concept. In AS you have to write your own logic in the override function set currentState. override public function set currentState(value:String):void { super.currentState = value; //write your logic for states } 回答2: The includeIn pseudo-attribute only exists in the MXML

ByteArray issue with Actionscript project

徘徊边缘 提交于 2020-01-16 18:48:24
问题 I'm trying to create a project for this library in FDT 5 IDE I create a new project: File->New FDT Project->Web->AS3 then hit finish Copied the files form here: https://github.com/jwagener/recorder.js/tree/master/flash However the IDE is showing problems in the project: Description Resource Path Location Type Could not resolve type reference to 'flash.utils.ByteArray' at line 576 column 25. MultipartURLLoader.as /recorder/src/ru/inspirit/net Unknown Flash Problem Could not resolve type

display and navigate a web page from a flex tab

烈酒焚心 提交于 2020-01-16 18:12:47
问题 i have a flex project that runs in using flash player 11. What i am trying to achive is to have a tab of my project which, when loaded displays a web page within the tab. I do not want to naviagate away from my project but display it within my tab layout. Is this possible? i have found plenty of info on how to do this using air but nothing with regards to my flex project not using air. thanks 回答1: No, this isn't directly possible. The HTML and StageWebView components would do the trick, but