apache-flex

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:/

AS3 - How to do a synchronous load of an asynchronous call?

社会主义新天地 提交于 2019-12-29 09:21:46
问题 I have a function that loads a user object from a web service asynchronously. I wrap this function call in another function and make it synchronous. For example: private function getUser():User{ var newUser:User; var f:UserFactory = new UserFactory(); f.GetCurrent(function(u:User):void{ newUser = u; }); return newUser; } UserFactory.GetCurrent looks like this: public function GetCurrent(callback:Function):void{ } But my understanding is there is no guarantee that when this function gets

AS3: How accurate are the getTimer() method and the Timer class?

风格不统一 提交于 2019-12-29 08:58:44
问题 I'm in the process of making a game (a shmup) and I've started to question the accuracy of the timers in ActionScript. Sure, they're accurate enough when you want to time things on the order of a few seconds or deciseconds, but it seems to perform pretty poorly when you get to finer ranges. This makes it pretty tough to do things like have a spaceship firing a hundred lasers per second. In the following sample, I tested how long (on average) the intervals were between 1000 timer ticks

Game Development: Flex or Flash IDE?

假装没事ソ 提交于 2019-12-29 08:14:13
问题 Which would be more comprehensive for game development? 回答1: It depends. Are you working by yourself or in a team ? Are you more a designer or a developer ? What's your level of comfort with actionscript ? If you're just starting with actionscript , you're somewhat comfortable with the Flash IDE and you want to make fun indy games for people to bash buttons and destroy mice, go with Flash . The look will weigh more at this stage and interaction will be simpler. Never the less you can create

Does HTML5 only replace the video aspects of Flash/Silverlight?

a 夏天 提交于 2019-12-29 08:14:10
问题 I see a lot of talk how HTML5 video tag will kill Flash. But while video is the most widely used part of Flash/SL, it's only a small part of their technical abilities. For instance you can write a game using full 3D graphics and socket connections in Flex, and serious business applications, etc. Is the thinking that Javascript will kill those parts of Flash/Flex/SL? Because while that seems feasible now for even quite rich web-apps, what about any kind of high-performance app like real-time

MouseWheel in Chrome and Firefox

两盒软妹~` 提交于 2019-12-29 04:26:07
问题 I'm trying to handle the mouseWheel event in an advancedDataGrid with not success. Without any additional code my adg can be scrolled with the mouse in IE but not in firefox and Chrome, why? Why does it behave different in those browsers? Then I tried this code but it does not work: protected function adgMouseWheelHandler(event:MouseEvent):void { event.delta = event.delta > 0 ? 1 : -1; } and then setting the event mouseWheel in my adg like this: <mx:AdvancedDataGrid id="myADG" width="100%"

MouseWheel in Chrome and Firefox

≡放荡痞女 提交于 2019-12-29 04:26:02
问题 I'm trying to handle the mouseWheel event in an advancedDataGrid with not success. Without any additional code my adg can be scrolled with the mouse in IE but not in firefox and Chrome, why? Why does it behave different in those browsers? Then I tried this code but it does not work: protected function adgMouseWheelHandler(event:MouseEvent):void { event.delta = event.delta > 0 ? 1 : -1; } and then setting the event mouseWheel in my adg like this: <mx:AdvancedDataGrid id="myADG" width="100%"

Flash Builder launch failed - invalid application descriptor: Unknown namespace

落花浮王杯 提交于 2019-12-29 01:58:45
问题 I'm having difficulty getting a Flex mobile project to run on my machine. When I try and run the project I get the following error: Process terminated unexpectedly. invalid application descriptor: Unknown namespace: http://ns.adobe.com/air/application/16.0 Launch command details: "C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\bin\adl.exe" -runtime "C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks\4.6.0\runtimes\air\win" -profile mobileDevice -screensize

How to decode Json using native JSON or actionjson in Flex 3

痞子三分冷 提交于 2019-12-28 12:45:22
问题 I have the below Json (wf.json) { "workflow":{ "template":"Analysis1", "start":{ "instance":"HDA_run1", "user":"symtest", "date":"3-Mar-2012", "timestamp":"1330948220475" }, "host":{ "name":"bartla", "user":"symtest1", "password":"symtest1", "installpath":"", "product":"" }, "javadump":{ "pid":"8989", "corefilename":"", "heapdump":"", "stack":"", "JAVA_HOME":"" }, "mat":{ }, "email":{ "to":"ars@gmail.com", "subject":"", "message":"" }, "end":{ } } } As you can see there are 7 items (or sub

Download a file with Adobe AIR

元气小坏坏 提交于 2019-12-28 05:34:52
问题 How do I download a file from the internet in a Flex based AIR application. I tried using a file with url set to the address, but I got a file does not exist error when I tried to save it. And it is really hard to google for help on this issue. 回答1: You want to choose from 2 api combos to accomplish this. Version 1 is URLLoader and FileStream Using this combination of class, you would load the file from your server in to air via the URLLoader object. This will download the file in to memory