actionscript

Multithreading or green threading in actionscript?

我的未来我决定 提交于 2019-12-01 06:29:42
问题 I was wondering if there are any code or class libraries out there on how to implement multithreading or "green threading" in ActionScript. As you've might seen, Scott Peterson is developing some kind of toolset, but I haven't found any more info on this other than his performance on the Adobe MAX Chicago event. Regards Niclas 回答1: Here's a Green Threading lib from Drew Cummins: http://blog.generalrelativity.org/?p=29 回答2: There's no built-in way to do green threading in ActionScript. You

Is “Export Movie” as PNG Sequence for movies with actionscript animation possible in Flash CS4?

送分小仙女□ 提交于 2019-12-01 06:08:24
问题 I was wondering if there is any way to use the "Export Movie" as "PNG Sequence" to work for movies where objects are animated with actionscript. Exporting like this works just dandy for normal animations, but it doesn't work for my current project. Basically I am creating images using mathematics and I want to be able to export the result as a png for use in other programs like photoshop; but since the images are created with actionscript the export just shows a blank image. Am I reduced to

Pass arguments from an array to an Actionscript method with …(rest) argument

拥有回忆 提交于 2019-12-01 05:59:14
问题 my question is the Flex transposition of this question : Can I pass an array as arguments to a method with variable arguments in Java? That is, I have an Array in some Actionscript code and i need to pass every object indexed in the array into a method method(...arguments) . Some code to make it clear: private function mainMethod():void{ var myArray:Array = new Array("1", "2", "3"); // Call calledMethod and give it "1", "2" and "3" as arguments } private function calledMethod(...arguments)

How can I get a datagrid to behave like the ctrl key is active?

做~自己de王妃 提交于 2019-12-01 05:35:21
问题 I want my data grid to behave by default as if the user is holding the control key down. So when an item is clicked, then another item they are both part of the selection, clicking them again removes them from the selection. I already have allowMultipleSelection = true but I can't seem to find any setting that does this. I'm working on the itemclick event in the meantime, but it seems like there might be an easy to use setting I'm missing. Any thoughts? 回答1: You could also extend DataGrid and

flash as3 - how do I find an object's index in an array

雨燕双飞 提交于 2019-12-01 05:26:16
问题 how do you find an object's index / position within an array in flash actionscript 3? I am trying to set a conditional up in a loop where, if an object's id is equal to the current_item variable, I can return its position within the array. 回答1: Something like this might help you - this example returns the position of the value 7: private var _testArray:Array = new Array(5, 6, 7, 8, 9, 8, 7, 6); public function ArrayTest() { trace (_testArray.indexOf(7)); //Should output 2 } so for your needs:

Flash trace output in firefox, linux

安稳与你 提交于 2019-12-01 05:24:53
问题 I'm developing an applications which I've got running on a server on my linux desktop. Due to the shortcomings of Flash on Linux (read: too hard) I'm developing the (small) flash portion of the app in Windows, which means there's a lot of frustrating back and forth. Now I'm trying to capture the output of the flash portion using flash tracer and that is proving very difficult also. Is there any other way I could monitor the output of trace on linux? Thanks... 回答1: Hope this helps too (for the

filling in (…rest) parameters with an array?

余生长醉 提交于 2019-12-01 03:37:06
Some as3 functions handle overloading by allowing for an arbitrary number of parameters using the convention: public function doSomething( ... rest ):void; I am in a situation where I need to pass all the values of an array (of arbitrary length) into this type of function... I am not sure how to do this. Suggestions? Here is a hack solution, but it is not extensible: switch (args.length) { case 0: doSomething(); break; case 1: doSomething(args[0]); break; case 2: doSomething(args[0], args[1]); break;} Check out Function#Apply() . It lets you pass the parameters as an array. doSomething.apply

Cleanly merge two arrays in ActionScript (3.0)?

↘锁芯ラ 提交于 2019-12-01 03:00:20
What's a nice way to merge two sorted arrays in ActionScript (specifically ActionScript 3.0)? The resulting array should be sorted and without duplicates. To merge (concatenate) arrays, use .concat() . Below are two examples of how you can concatenate arrays and remove duplicates at the same time. More convenient way: (you can use ArrayUtil.createUniqueCopy() from as3corelib ) // from as3corelib: import com.adobe.utils.ArrayUtil; var a1:Array = ["a", "b", "c"]; var a2:Array = ["c", "b", "x", "y"]; var c:Array = ArrayUtil.createUniqueCopy(a1.concat(a2)); // result: ["a", "b", "c", "x", "y"]

Lint tool for actionscript?

你离开我真会死。 提交于 2019-12-01 02:30:41
Are there any lint tools available for actionscript? One source would be ideal, but anything is welcome. My team is starting to adopt more a more rigorous style guide (where "more rigorous" means "existant"), and I think a linter would help us all adhere more easily to the style rules we've agreed on. I'm not above writing my own, but I'd like to see what else is out there first. A quick search on Google reveals nothing (at least so far). If you're dealing with Flex, take a look at FlexPMD . FlexPMD should actually be named As3PMD. I mean you can run FlexPMD against a pure AS3 project, not

Adobe Socket Policy File Server Problems

浪尽此生 提交于 2019-12-01 02:11:55
Has anyone been able to successfully implement a service to serve the required socket policy file to FlashPlayer? I am running the Python implementation of the service provided by Adobe at http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html and using the following policy file: <?xml version="1.0" encoding="UTF-8"?> <cross-domain-policy> <site-control permitted-cross-domain-policies="master-only"/> <allow-access-from domain="*" to-ports="*" secure="false"/> </cross-domain-policy> and receiving this message from Flash: [SecurityErrorEvent type="securityError" bubbles=false