apache-flex

Is it a bad idea to implement a timer loop in Flex?

≡放荡痞女 提交于 2019-12-21 20:14:56
问题 In our game project we did have a timer loop set to fire about 20 times a second (the same as the application framerate). We use this to move some sprites around. I'm wondering if this could cause problems and we should instead do our updates using an EnterFrame event handler? I get the impression that having a timer loop run faster than the application framerate is likely to cause problems... is this the case? As an update, trying to do it on EnterFrame caused very weird problems. Instead of

FLEX: dialog not display immediately

核能气质少年 提交于 2019-12-21 17:47:52
问题 In an AIR application I have the following code: theDialog = PopUpManager.createPopUp( this, TheDialogClass, true ) as TheDialogClass; theDialog.addEventListener(FlexEvent.CREATION_COMPLETE, cpuIntensiveCalc); At the end of cpuIntensiveCalc the dialog is removed. The dialog informs the user that "something is going on, please stand by." The problem is that cpuIntensiveCalc starts before the dialog draws. So the user experience is that the application freezes for 10 seconds with no indicator,

Speex or nellymoser

北战南征 提交于 2019-12-21 17:44:33
问题 I am developing a voice application, I have 2 options speex and nellymoser .Why should I use speex instead of nellymoser in flex application. 回答1: this should make it clear , Comparison of both codecs for flex: http://askmeflash.com/article/2/speex-vs-nellymoser 回答2: Speex is open source, optimized for speech and seems to have lower bandwidth requirements. However, in Flash/AIR, Speex is always 16 kHz, which is not quite the Skype-like crispness of the sound. Because of that, we're currently

What material did you use to learn Flex/Air, and with ColdFusion + BlazeDS/LCDS? [closed]

不羁岁月 提交于 2019-12-21 17:41:16
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . What material did you use to learn Flex/Air itself, and with ColdFusion + BlazeDS/LCDS? 回答1: Flex in a Week http://www.adobe.com

Consume data from XML file in an HTML5 application?

∥☆過路亽.° 提交于 2019-12-21 17:38:37
问题 I have some XML files which are currently used to load data into Adobe Flex applications. I am trying to make an HTML5 version of the application, and I need to load this same data into the html "app" so I can use and manipulate like I would in Flex. I have searched and can't find any information or examples on how to do this, or even if it can be done. For example, if my application is a quiz, I have the questions, choices, and correct answers in an XML file. I would like the HTML file to

How to suppress Flash migration warnings (1090)

有些话、适合烂在心里 提交于 2019-12-21 09:22:12
问题 In Flash Professional CS4, I get "migration issue" warnings when I use mouse/keyboard input handler names such as onMouseDown, onKeyUp, etc., even though I have added event listeners for them. These names are perfectly legal for functions, but since these were automatically fired in ActionScript 2.0, we are now (albeit sensibly) warned that their use is no longer automatic in AS3. I understand the purpose of the warnings, but they aren't useful for me. I want to suppress these warnings, but

Why does delete( DictionaryInstance[ key ] ); fail?

妖精的绣舞 提交于 2019-12-21 08:15:11
问题 My app uses a Dictionary protected _categoryToValueDict:Dictionary = new Dictionary(); to map something to something else. Now, at a certain point in the application, I need to remove a certain key from the Dictionary . I implemented this simple method: public function setCategoryNoValue( cat:TAModelCategory ):void { // delete( _categoryToValueDict[ cat ] ); var old:Dictionary = _categoryToValueDict; _categoryToValueDict = new Dictionary(); for ( var key:* in old ) { if ( key != cat ) {

in flex, dynamically load Sound object from encoded bytes

雨燕双飞 提交于 2019-12-21 06:28:20
问题 I have a legacy file format that contains sounds embedded in it (in various encodings). I would like to be able to play these sounds in Flash (Air?) by reading the sound bytes out of the file and instantiating a Sound object with them. If the sound is unencoded (e.g., raw pcm), I've found that I can use the new flex 4 SampleDataEvent.SAMPLE_DATA event to play the sound. However, if the sound is encoded (e.g., mp3), then I'm at a loss. The sound expected by SampleDataEvent.SAMPLE_DATA has to

AIR App that Loads and Runs Existing AIR swf

好久不见. 提交于 2019-12-21 05:41:50
问题 I have an existing AIR app whose main content is App.swf. I would like to have another AIR app that hosts and runs App.swf. When I say run it, I mean displays it's WindowedApplication. Here's the code for the 2 AIR projects (imports are omitted for brevity): // App AIR Project -> App.mxml -> App.swf (it's just a window) <?xml version="1.0" encoding="utf-8"?> <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"> <mx:Script> <![CDATA[ public function doSomething():void { trace(

Pause and resume download in flex?

孤者浪人 提交于 2019-12-21 05:38:18
问题 Is it possible in an air application to start a download, pause it and after that resume it? I want to download very big files (1-3Gb) and I need to be sure if the connection is interrupted, then the next time the user tries to download the file it's start from the last position. Any ideas and source code samples would be appreciated. 回答1: Yes, you would want to use the URLStream class (URLLoader doesn't support partial downloads) and the HTTP Range header. Note that there are some onerous