actionscript

Is it possible to trace references between objects in Flash, in the same way as the Flash Builder profiler?

こ雲淡風輕ζ 提交于 2020-01-25 18:44:47
问题 I'm trying to find memory leaks in a fairly large Flex application and I'm tired of using the paltry tools Flash Builder makes available. Specifically, I want to analyse the relationships of objects in memory, using the same information Flash Builder's tools appear to have access to. I.e. which objects are in memory, and which objects they have references to, and have references to them. Given that information, I want to construct a directed graph whose nodes are live objects and whose edges

AxisRenderer's labelRotation property doesn't do anything

拜拜、爱过 提交于 2020-01-25 12:33:39
问题 Despite setting the labelRotation property to 90 in this column chart, the axis labels are horizontal. Is there something additional I need to do? <mx:ColumnChart id="myChart" height="100%" width="100%" dataProvider="{myData}" showDataTips="true"> <mx:horizontalAxis> <mx:CategoryAxis id="h1" categoryField="code"/> </mx:horizontalAxis> <mx:horizontalAxisRenderers> <mx:AxisRenderer axis="{h1}" labelRotation="90" /> </mx:horizontalAxisRenderers> <mx:series> <mx:ColumnSet type="stacked"

Calling a Classes' Method From Another Class in Flash

别来无恙 提交于 2020-01-25 08:24:25
问题 If I have a document class: package { import flash.display.MovieClip; public class Main extends MovieClip { public function Main() { } public function SomeRandomMethod():void { } } } How can I call SomeRandomMethod from here: package { public class AnotherClass { public function AnotherClass() { } public function AnotherRandomMethod():void { /* I need to use SomeRandomMethod here */ } } } 回答1: There are a few ways to achieve this. One way would be to pass a reference of the document class to

Procedurally accessing a function's parameter list in actionscript 2.0

不想你离开。 提交于 2020-01-24 17:23:05
问题 I can already get at all of the functions in a class by doing something like the following. for (var member in obj) { if (obj[member] instanceof Function) { var f:Function = obj[member]; ... } } Is there a way to get at a function's parameter list in actionscript? For example, can I write a function that does something like this? function getFunctionArguments (f:Function) : Array { var argumentArray:Array = new Array(); for (...) { ... argumentArray.push({ name:<argumentName>, type:<argument

Actionscript to java source converter

泪湿孤枕 提交于 2020-01-21 11:58:48
问题 is there a tool which can convert actionscript3 source code to java source? 回答1: I ran into this page awhile ago because I needed an actionscript to java converter too. I wrote one myself. It's very simple and requires manual adaptation after conversion (as most such converters do), but it does a good job of automating the boring stuff. You can find it on my blog. 回答2: I believe Haxe (which has similar syntax to AS3, also based on the ECMA Specification) is able to compile to Java (as well as

What is the maximum integer value in Flex?

感情迁移 提交于 2020-01-21 11:19:07
问题 I was trying to display a number: 2893604342.00. But, when i am displaying it it is displayed as: -2893604342. Following is the code snippet ... avg += int(totalData[i][col.dataField]); I have even replaced it with Number , but it's still showing the same negative number. Please let me know whether there is any problem with int or Number ! 回答1: The maximum values are accessible through each numeric type's static properties: Number.MAX_VALUE uint.MAX_VALUE int.MAX_VALUE (Just trace 'em.) 回答2:

Generate A Weighted Random Number

♀尐吖头ヾ 提交于 2020-01-18 02:23:05
问题 I'm trying to devise a (good) way to choose a random number from a range of possible numbers where each number in the range is given a weight. To put it simply: given the range of numbers (0,1,2) choose a number where 0 has an 80% probability of being selected, 1 has a 10% chance and 2 has a 10% chance. It's been about 8 years since my college stats class, so you can imagine the proper formula for this escapes me at the moment. Here's the 'cheap and dirty' method that I came up with. This

Generate A Weighted Random Number

南笙酒味 提交于 2020-01-18 02:22:11
问题 I'm trying to devise a (good) way to choose a random number from a range of possible numbers where each number in the range is given a weight. To put it simply: given the range of numbers (0,1,2) choose a number where 0 has an 80% probability of being selected, 1 has a 10% chance and 2 has a 10% chance. It's been about 8 years since my college stats class, so you can imagine the proper formula for this escapes me at the moment. Here's the 'cheap and dirty' method that I came up with. This

odd math in actionscript 3? [duplicate]

梦想的初衷 提交于 2020-01-17 16:38:45
问题 This question already has answers here : Closed 10 years ago . Duplicate: Why do I see a double variable initialized to some value like 21.4 as 21.399999618530273? Is JavaScript’s math broken? many, many other questions, for every language and platform, all with the same answer. trace( ">> " + (399.6-(Math.floor(399.6))) ); prints out >> 0.6000000000000227 why? 回答1: Floating Point rounding errors. Floating point numbers can't represent some values exactly, so what you are seeing is the

odd math in actionscript 3? [duplicate]

拥有回忆 提交于 2020-01-17 16:37:49
问题 This question already has answers here : Closed 10 years ago . Duplicate: Why do I see a double variable initialized to some value like 21.4 as 21.399999618530273? Is JavaScript’s math broken? many, many other questions, for every language and platform, all with the same answer. trace( ">> " + (399.6-(Math.floor(399.6))) ); prints out >> 0.6000000000000227 why? 回答1: Floating Point rounding errors. Floating point numbers can't represent some values exactly, so what you are seeing is the