flex3

Does dispatching an event interrupt a function?

白昼怎懂夜的黑 提交于 2019-12-22 05:57:14
问题 Let's say function foo() is executing. Suppose that an external event occurs, for which you have a handler. Will function foo() be interrupted so that the event handler can be executed? What is the order of execution in this situation? 回答1: No, foo() will not be interrupted. Flex is single-threaded, so foo() will continue running. Once foo() finishes and control is returned to the event loop, then the first event in the event queue will be processed. 回答2: This actually can be sorta tricky. I

Flex: Caching images in list item renderer?

会有一股神秘感。 提交于 2019-12-22 05:17:44
问题 I have a List and the item renderer displays an image. Whenever you scroll the list, and the item renderer refreshes, it redownloads the image. Causing there to always be a delay. Is there some way of caching it so it doesn't have to redownload every time causing a delay in showing the image every time you scroll the list? Thanks! 回答1: Here is nice solution with source code http://demo.quietlyscheming.com/superImage/app.html 回答2: You'll have to implement your own caching. I would store all

inner class in AS

岁酱吖の 提交于 2019-12-22 01:58:38
问题 for example: package{ public class A { var test:String; public function A() } } class B{ } the code is in the same file, we call B is inner class, then how to call the constructor of class B 回答1: package { public class A { var test:String; public function A() { var b:B = new B(); } } } class B { public function B() { trace('class B'); } } 来源: https://stackoverflow.com/questions/3594013/inner-class-in-as

Flex DataGrid with ComboBox itemRenderer

主宰稳场 提交于 2019-12-20 10:43:39
问题 I'm going spare trying to figure out the "correct" way to embed a ComboBox inside a Flex (3.4) DataGrid. By Rights (e.g. according to this page http://blog.flexmonkeypatches.com/2008/02/18/simple-datagrid-combobox-as-item-editor-example/) it should be easy, but I can't for the life of me make this work. The difference I have to the example linked above is that my display value (what the user sees) is different to the id value I want to select on and store in my data provider. So what I have

Flex performance considerations

╄→尐↘猪︶ㄣ 提交于 2019-12-20 09:38:16
问题 What are the main key-points a Flex developer should remember in order to improve performance of Flex applications? The ones which come to my mind are: extending ItemRenderers from more lightweight base classes: i.e. UIComponent using suspendBackgroundProcessing set to true for animations using ArrayLists instead of ArrayCollections where appropriate. useVirtualLayout in Spark DataGroups (unfortunately this step requires Scrollers to make this advice effective) SQLight performance

Flex 3 and soap response?

半腔热情 提交于 2019-12-20 05:46:25
问题 I want to insert data into a SQL Server, but I keep getting this error RPC Fault faultString="SOAP Response cannot be decoded. Raw response:faultCode="DecodingError" faultDetail="null"] I can get data all day, but why can't I input any? <mx:WebService id="ws" wsdl="http://localhost:/AService01.asmx?wsdl" fault="onFault(event)"> <mx:operation name="GetEmployees" resultFormat="object" result="GetEmployees(event)"/> </mx:WebService> <mx:Script> import mx.collections.ArrayCollection; import mx

Flex 3 and soap response?

ⅰ亾dé卋堺 提交于 2019-12-20 05:46:12
问题 I want to insert data into a SQL Server, but I keep getting this error RPC Fault faultString="SOAP Response cannot be decoded. Raw response:faultCode="DecodingError" faultDetail="null"] I can get data all day, but why can't I input any? <mx:WebService id="ws" wsdl="http://localhost:/AService01.asmx?wsdl" fault="onFault(event)"> <mx:operation name="GetEmployees" resultFormat="object" result="GetEmployees(event)"/> </mx:WebService> <mx:Script> import mx.collections.ArrayCollection; import mx

Loading flex modules compiled with Flex 4 SDK into an application compiled with Flex 3.5

旧时模样 提交于 2019-12-20 03:38:15
问题 I am working on a feature for an application that requires Flex 4 functionality. Due to some migration issues of the application from Flex 3.5 to 4.0, I have decided to implement this feature as a module that is compiled with Flex 4.0. The theory is that the application would remain compiled in Flex 3.5 and load the module when it needs it. Here is the module loading code: public function loadDiagModule():void { var moduleLoader:ModuleLoader = new ModuleLoader(); moduleLoader.url = "module

Why do we not have splice in array collection?

淺唱寂寞╮ 提交于 2019-12-20 03:37:09
问题 From what I know the whole idea behind having collection classes is introduce extra wrapper methods which will be handy for developers. Then why does ArrayCollection in Flex not seem to have some methods that array has. ArrayCollection does not have a copy, concat, join or splice methods which return a new array so we need to do the copy manually? Or I am missing something in here? Thanks. 回答1: You're right, the methods are not there. There is no published reason for the decision, that I can

Change A Character In A String Using Actionscript

混江龙づ霸主 提交于 2019-12-19 20:01:42
问题 What is the opposite of String.charAt() ?? If I Have a string: var Str:String="Hello World"; How do I change the 5th character, for example, from a ' ' to an '_'? I can GET the 5th character like this: var C:String=Str.charAt(5); But how do I SET the 5th character? Thanks in advance. 回答1: There are many ways to skin this cat. One, off the top of my head, would involve String.substr: var Str:String="Hello World" var newStr:String = Str.substr(0,5) + "_" + Str.substr(6); or, the same as above,