actionscript

Understanding / Modeling formulas from Excel [closed]

若如初见. 提交于 2020-01-02 10:05:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . I have an excel spreadsheet that performs many calculations based on 4 cells to come up with a certain figure. I have been tasked to convert this spreadsheet to a widget like component that can be embedded into a web application. Is there an easy way to display or understand the embedded formula's in the excel

Synchronous calls using RemoteObject

南楼画角 提交于 2020-01-02 09:59:25
问题 Is there a way to make synchronous calls using RemoteObject in Flex? 回答1: All IO in Flex is asynchronous. The typical pattern to deal with this is to use an AsyncResponder. For instance: var t:AsyncToken = remoteObject.methodCall(); t.addResponder(new AsyncResponder(resultEvent, faultEvent)); 回答2: think twice when u want it to be synchronous. Do u know what synchronous mean? it will FREEZE your application until it receive data. Unless u are pretty sure that your remote calling can receive

how to call actionscript function from javascript

梦想的初衷 提交于 2020-01-02 07:32:11
问题 I have a function like this in actionscript3 private function uploadFile(event:MouseEvent):void { var uploader:URLRequest = new URLRequest(serverUploadFile); localFile.upload(uploader); } how can i call this function from javascript ? thx 回答1: In AS3 Use ExternalInterface to add a javascript callback. ExternalInterface.addCallback("uploadFile", null, uploadFile); More details here 回答2: Use ExternalInterface 来源: https://stackoverflow.com/questions/1674402/how-to-call-actionscript-function-from

How to wait for 3 seconds in ActionScript 2 or 3?

久未见 提交于 2020-01-02 00:48:08
问题 Is there any way to implement waiting for, say, 3 seconds in ActionScript, but to stay within same function? I have looked setInterval, setTimeOut and similar functions, but what I really need is this: public function foo(param1, param2, param3) { //do something here //wait for 3 seconds //3 seconds have passed, now do something more } In case you wonder why I need this - it is a legal requirement, and no, I can't change it. 回答1: Use the Timer to call a function after 3 seconds. var timer

Set JSON content-type on s:HttpService in flex

两盒软妹~` 提交于 2020-01-01 09:24:22
问题 I am trying to set the json content type on httpservice to make REST service return the json data. When I add the content type in fiddler all works fine so the problem lays in flex application, not in the web-service. But the code below does not work and I get the xml data instead of json. Could anyone provide me the workaround/solution? mxml: <s:HTTPService id="service" method="POST" url="server.com" result="loaded(event)" fault="fault(event)" useProxy="false" resultFormat="text">

actionscript (flex): how to know whether a property of object exists (or defined)?

为君一笑 提交于 2020-01-01 07:36:19
问题 I am a Java developer who tries Flex. Here is my problem: I behave actionScript objects as hashmap but when the object do not have the property it gives exception: No such variable. Here I expect it gave me null, instead of giving exception. So do you know is there a way to handle it, namely check if the property is defined for object. trace( obj["2008-02"] ) // gives exception 回答1: Use something along the lines of if (myObject.hasOwnProperty("propertyName")) to check if the property exists.

Pinless OAuth on Adobe AIR for Android

白昼怎懂夜的黑 提交于 2020-01-01 06:25:26
问题 I got pinless OAuth working on Adobe AIR for Desktop, iOS, but not Android. For some reason, we're not getting the oauth_verifier (which contains the sha'd code) in StageWebView on an Android device. Any clue? Here's the debug for on desktop and on Droid 2; notice the 3rd line in the Droid 2 trace output which is missing all the OAuth variables after the callback URL. Desktop: AuthorizeTwitterService::onComplete, data: oauth_token=De2k4zANjzAhT3hXV4eqOfTVxJsshVIJjgsuwPMUg8&oauth_token_secret

Why Sytem.totalMemory keeps increasing?

和自甴很熟 提交于 2020-01-01 05:17:06
问题 I have this blank project, just to check out System.totalMemory variable. As far as I can see, i get this values: 3076 3092 3096 3088 3092 3096 3100 3104 3108 3112 3117 3121 3125 3129 3133 3137 3141 3145 3149 ... And so on I had no Flash open, no Internet Browser, no other instance of flash. The project is blank, only one static text, and one dynamic text, called 'memory'. One *.as file, that contains this code: package{ import flash.display.Sprite; import flash.events.Event; import flash

Disadvantages of a Flex project vs an Actionscript project?

折月煮酒 提交于 2020-01-01 05:15:06
问题 I've recently started making a game in FlexBuilder. The game is currently a Flex project. Is there any downside to using Flex as opposed to just Actionscript? A friend of a friend told me that Flex is slower than an Actionscript project. I've been unable to validate this on the internet; is there any truth to that claim? Thanks! 回答1: If you're developing a game, you should be using an ActionScript project. Flex is to be used only for data driven applications and user interfaces. The flex

Add days to Date in ActionScript

僤鯓⒐⒋嵵緔 提交于 2020-01-01 04:33:07
问题 We have an application in which the user has to enter a date who's value is no more than 30 days after the the current date (the date on which the user uses the application). This is a Flash application, therefore I need a way to add 30 days to the current date, and get the right date. Something like in JavaScript: myDate.setDate(myDate.getDate()+30); Or in C#: DateTime.Now.Add(30); Is there such a thing in ActionScript? 回答1: While the other answers will work im sure, it is as easy as doing: