apache-flex

Local Timer Object Event Handler

荒凉一梦 提交于 2019-12-22 07:07:39
问题 I have the following code in a class function : public function foo():void { var timer:Timer = new Timer(10000,1); timer.addEventListener(TimerEvent.TIMER_COMPLETE,onTimerComplete); timer.start(); } public function onTimerComplete(e:TimerEvent):void { // do stuff } The above code works most of the time but my concern is what happens if timer gets garbage collected? Is it possible that onTimerComplete will never fire because there are no other references to timer? I know timer has an internal

Flex-built SWF's no longer work, error 2048, 2046, 2032

和自甴很熟 提交于 2019-12-22 07:01:00
问题 I'm really confused about this problem, and I'm pretty new to Flex. Basically, anything I try to build with mxmlc fails to run now, giving me the above three errors depending on what I do. It was working 30 minutes ago, I've been spending that time trying to figure out what has changed. I redownloaded the Flex SDK, cleared my assetcache, have cleared Firefox's cache. (I'm using Linux.) Even if I compile with -static-link-runtime-shared-libraries=false, since it seems like #2048 is a RSL

How to use C# with AIR?

為{幸葍}努か 提交于 2019-12-22 06:37:03
问题 I have some basic experience in making Flex sites, but I think I have more use for Flex in making a desktop AIR application. Anyway, I was wondering if it is at least possible to use C# alongside Actionscript/AIR? I can't find any example of this. Also, can I use custom Flash components in a Flex app? I know I can use Javascript components. Thanks 回答1: Your options with AIR are limited to HTML/JS, Flash/ActionScript or Flex. There's no support for other languages and frameworks. 回答2: You can

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

Cannot convert apple developer_identity.cer into .p12 format. No certificate matches private key

我们两清 提交于 2019-12-22 05:33:12
问题 i have following problem: i have these files developer_identity.cer Team_Provisioning_Profile_.mobileprovision In order to package adobe flex mobile application for iOS, i need to convert my .cer certificate into .p12 format. Following this tutorial on help.adobe.com i always get this problem when executing last openssl command: "no certificate matches private key error in pkcs12" From what i understand i need somehow to get private key, that was used to create the certificate (do i

How do I delete a value from an Object-based associative array in Flex 3?

大兔子大兔子 提交于 2019-12-22 05:31:54
问题 I need to remove the value associated with a property in a Flex 3 associative array; is this possible? For example, suppose I created this array like so: var myArray:Object = new Object(); myArray[someXML.@attribute] = "foo"; Later, I need to do something like this: delete myArray[someXML.@attribute]; However, I get this error message at runtime: Error #1119: Delete operator is not supported with operand of type XMLList. How do I perform this operation? 回答1: delete doesn't do as much in AS3

How do I delete a value from an Object-based associative array in Flex 3?

时光毁灭记忆、已成空白 提交于 2019-12-22 05:31:12
问题 I need to remove the value associated with a property in a Flex 3 associative array; is this possible? For example, suppose I created this array like so: var myArray:Object = new Object(); myArray[someXML.@attribute] = "foo"; Later, I need to do something like this: delete myArray[someXML.@attribute]; However, I get this error message at runtime: Error #1119: Delete operator is not supported with operand of type XMLList. How do I perform this operation? 回答1: delete doesn't do as much in AS3

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

Flex Spark List Mouse Wheel Scroll Speed

China☆狼群 提交于 2019-12-22 04:48:17
问题 I have a component extending a Spark List, and when I scroll using the mouse wheel it scrolls too much in one go. I have tried looking for the handler that deals with mouse wheel scrolling in the List class and VerticalLayout class to override but I cannot find it. Is there another way I'm supposed to change this, or am I missing something? 回答1: The "delta" property of MouseEvent.MOUSE_WHEEL defines how many lines will be scrolled by one wheel-scrolling. You could try changing it in the MOUSE

Find out the character pressed key

雨燕双飞 提交于 2019-12-22 04:43:21
问题 If I add a listener to KeyboardEvent.KEY_DOWN, I can find out the keyCode and the charCode. The keyCode maps to a different character depending on the keyboard. The charCode is just as useless, according to the help: The character code values are English keyboard values. For example, if you press Shift+3, charCode is # on a Japanese keyboard, just as it is on an English keyboard. So, how can I find out which character the user pressed? 回答1: You left out a pretty important part of the quote or