apache-flex

How to close all popup windows in Flex?

杀马特。学长 韩版系。学妹 提交于 2019-12-31 04:20:32
问题 I want to show all popup windows(already popped up and closed individually) on an image by pressing a button press and want to close all those windows on another button press. Any help is appreciated. 回答1: Try this: package com.devahead.utils { import flash.display.DisplayObject; import mx.collections.ArrayCollection; import mx.core.Application; //import mx.core.FlexGlobals; // NOTE: use this import for Flex 4.x and higher import mx.core.IChildList; import mx.core.UIComponent; import mx

Flex 3: Getting variables from URL

坚强是说给别人听的谎言 提交于 2019-12-31 01:49:33
问题 If I have an application located at http://sitename.com/myapp/ and i want to pass in a variable via the url (i.e. - http://sitename.com/myapp/?name=Joe), how can I get that name variable into a string var? 回答1: I use the class Adobe provided in this article. package { import flash.external.*; import flash.utils.*; public class QueryString { private var _queryString:String; private var _all:String; private var _params:Object; public function get queryString():String { return _queryString; }

Adobe Air: scroller throws error when changes focus between different applications

自古美人都是妖i 提交于 2019-12-31 01:43:46
问题 TypeError: Error #1009: Cannot access a property or method of a null object reference. at spark.components::Scroller/focusInHandler()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\Scroller.as:2139] at flash.display::Stage/set focus() at mx.core::UIComponent/setFocus()[E:\dev\4.y\frameworks\projects\framework\src\mx\core\UIComponent.as:9905] at spark.components::RichEditableText/setFocus()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\RichEditableText.as:3126] at spark

Is it OK to have multiple assertions in a unit test when testing complex behavior?

巧了我就是萌 提交于 2019-12-30 15:03:12
问题 Here is my specific scenario. I have a class QueryQueue that wraps the QueryTask class within the ArcGIS API for Flex. This enables me to easily queue up multiple query tasks for execution. Calling QueryQueue.execute() iterate through all the tasks in my queue and call their execute method. When all the results have been received and processed QueryQueue will dispatch the completed event. The interface to my class is very simple. public interface IQueryQueue { function get inProgress()

xml nodes will not delete despite calling “delete”

南楼画角 提交于 2019-12-30 14:50:13
问题 I'm trying to use the delete keyword to remove nodes from an xml file and it just plain won't work. Here's a stripped down example of what I'm working with. Every node has a child named "deleteme". If its value is equal to 1 I want to remove it from the xml file. If its anything else I want to leave it be. The delete method is deffinately gettig call but it's having no effect. <?xml version="1.0" encoding="utf-8"?> <stuff> <i> <deleteme> 0 </deleteme> </i> <i> <deleteme> 1 </deleteme> </i> <i

Flex Datagrid - how to obtain item for mouse x/y coordinates?

怎甘沉沦 提交于 2019-12-30 12:25:29
问题 my mission is to select an item in a DataGrid instance with nothing but the coordinates on screen. We are implementing right-click functionality in our Flash application, with the goal of being able to right-click a DG row, which would select that row plus show a popup window containing some context commands. I have managed to get the right click event into my Flex app with the help of this site. Further progress so far has been to obtain the DataGrid instance via var objects : Array = this

Flex Datagrid - how to obtain item for mouse x/y coordinates?

微笑、不失礼 提交于 2019-12-30 12:25:11
问题 my mission is to select an item in a DataGrid instance with nothing but the coordinates on screen. We are implementing right-click functionality in our Flash application, with the goal of being able to right-click a DG row, which would select that row plus show a popup window containing some context commands. I have managed to get the right click event into my Flex app with the help of this site. Further progress so far has been to obtain the DataGrid instance via var objects : Array = this

disable mouse wheel scrolling while cursor over flex app?

被刻印的时光 ゝ 提交于 2019-12-30 07:19:16
问题 Is it possible to disable mousewheel scrolling on my webpage while the cursor is over my flex application? My flex application is a map that allows user to zoom in and out using the mousewheel; however, when I put my flex app onto my webpage, the scrollwheel causes the page to scroll instead of zooming in and out... Edit: I have added sounds to my flex app and it tells me my mouse events are correct. I have also added an alertbox to the javascript so that I know the MyApp.initialize function

How do I find the length of an associative array in ActionScript 3.0?

孤者浪人 提交于 2019-12-30 04:20:07
问题 Is there a simple way to retrieve the length of an associative array (implemented as an Object ) in ActionScript 3.0? I understand that there are two primary ways of creating associative arrays in AS3: Use a Dictionary object; especially handy when the key does not need to be a string Use an Object , and simply create properties for each desired element. The property name is the key, and the value is, well, the value. My application uses approach #2 (using the Object class to represent

Flex graphic assets: SWF or SWC?

橙三吉。 提交于 2019-12-29 23:27:50
问题 Which is a better format to store graphic assets for a Flex application, SWF or SWC? Are there any real differences, and if so what are they? 回答1: Assets in a seperate SWF are loaded and included at runtime. Assets in a SWC are loaded and included / compiled at compile time. You can also directly embed assets within the main app SWF at compile time (check out the Embed meta data). Of course, you can also load individual assets (such as a PNG) directly at runtime. As far as which is better, it