flex4

How to insert data from dynamic array to sqlite db getting from WebService Using Loop in action script 3.0 and flex

萝らか妹 提交于 2019-12-31 06:03:49
问题 How can I insert dynamic Array to data base using Loop at the success of the Webservice call first my Webservice which i have Bind to DataGrid <fx:Declarations> <mx:WebService id="ws" wsdl="http://localhost:2690/vtrServices.asmx?wsdl"> </mx:WebService> <vtrservices:VtrServices id="vtrServices" fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)" showBusyCursor="true" result="vtrServices_resultHandler(event)" /> <s:CallResponder id="SignIn1Result2"/> <s:CallResponder id

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

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

Use JQuery or onbeforeunload for IE and FF

妖精的绣舞 提交于 2019-12-30 08:04:07
问题 I'm working in a Flex4 application, using javascript, in the "index.template.html" document. I'm having an issue being able to use onbeforeunload with Firefox. The application works perfectly in IE, but the exact same one doesn't sit well with FF. (See below) <script type="text/javascript"> window.onbeforeunload=before; window.onunload=after; function before(evt) { var flex=document.$(application)||window.$(application); flex.unloadMethod(); //custom method to log out the user } function

How to pass image from a flex application to a asp net c# web service?

荒凉一梦 提交于 2019-12-29 09:32:51
问题 I want to store images from the flex application to a asp net web service and at a later point will be sending these images back to flex application . Can you please give a example web method in c# or suggest a website to read about how to do this. I tried goggling but couldn't find anything very useful 回答1: There are two ways I can think of: use AMF and send ByteArray to C# (flex to c#) use URLRequest and it's data property to send ByteArray encoded in Base64 via HTTP POST 来源: https:/

How to prevent an item from be selected in a List

a 夏天 提交于 2019-12-25 04:54:13
问题 How do I prevent an item from being selected in a List? Let's say you want to use it for display or other reasons. 回答1: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Solution 1 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Call preventDefault in the changing handler like so: <s:List id="list" dataProvider="{myCollection}" changing="list_changingHandler(event)"/> The List change handler: protected function list

Restrict MouseEvents to Mask in Flex Skin?

偶尔善良 提交于 2019-12-25 04:37:15
问题 I have a ButtonSkin (Flex 4 Skin) with a Rect, a Label, and a Group, the Group masking the Rect. On rollOver, I animate the Label's x to this.width , and on rollOut, back to the original position. The problem is, when I rollOut, if I roll to the right (where the label is hiding behind the mask), it doesn't register rollOut, until I go past the label (this.width * 2). How do I prevent that, so when I rollOut of the visible area, even though I'm still over the label behind the mask, I get a

Flex4: How to add a child to spark Scroller in AS

核能气质少年 提交于 2019-12-25 03:36:05
问题 I want to convert the following code to ActionScript (mxml works fine): <mx:Panel title="Some Title" width="400" height="300"> <s:Scroller width="100%" height="100%"/> <mx:ColumnChart id="myChart" attribute="..." /> This doesn't work straight forward: setupChart(); //setup myChart var scroll:Scroller = new Scroller(); scroll.percentWidth = 100; scroll.percentHeight = 100; scroll.viewport = myChart; 回答1: adding a group first works for me setupChart(); var grp:Group = new Group(); grp

Flex 4: Enumerating Spark List items

ⅰ亾dé卋堺 提交于 2019-12-25 03:02:35
问题 How to enumerate items of Spark List component after setting dataProvider property? I mean accessing them as DisplayObject instances. 回答1: Iterate over list.dataGroup.numElements , calling list.dataGroup.getElementAt(i) : var i:int = 0; var n:int = list.dataGroup.numElements; for (i; i < n; i++) { // getElementAt returns an IVisualElement, but most displayobjects // in a list will be IVisualElement (which a UIComponent implements) var displayObject:DisplayObject = list.dataGroup.getElementAt

Change the text color of a datagrid row on particular condition in AIR application in flex 4

こ雲淡風輕ζ 提交于 2019-12-25 02:14:10
问题 I want to change the text color of the datagrid row on particular condition ie. i am checking on a condition.If that satisfies then I have to change the text color of each cell ie the whole row. Here is the code, private function resultHandlerGrid(event:ResultEvent):void{ arrc1 = ArrayCollection(event.result); adg1.addEventListener( ListEvent.ITEM_CLICK,getValue); } private function getValue(e:ListEvent):void{ if(e.itemRenderer.data.priority == "High") { e.itemRenderer.data.client_name