Questions tagged [actionscript]

ActionScript is a scripting language used to create Rich Internet Applications (RIA), mobiles applications, web applications, etc. It is the main language for Flash and Flex.

ActionScript is an object-oriented programming language originally developed by Macromedia (now dissolved into Adobe Systems). Its latest version is ActionScript 3.

It is used to create web applications (including RIAs), desktop applications and mobile applications. The web target is served using the Adobe Flash Player runtime, while the desktop and mobile targets are served using the Adobe AIR (previously Adobe Integrated Runtime).

Popular IDEs are Adobe Animate (rebranded from Adobe Flash), Adobe Flash Builder, FlashDevelop, IntelliJ and others.

Some of the popular compilers are Adobe Animate, Apache Flex, Haxe, OpenFL and others.

Adobe Scout and FlashFirebug can be used to debug the Adobe AIR and the Adobe Flash Player runtimes.

9141 questions
4764
votes
9 answers

How to pass "Null" (a real surname!) to a SOAP web service in ActionScript 3

We have an employee whose surname is Null. Our employee lookup application is killed when that last name is used as the search term (which happens to be quite often now). The error received is:
bill
  • 26,883
  • 3
  • 17
  • 13
212
votes
18 answers

What is the best way to stop people hacking the PHP-based highscore table of a Flash game

I'm talking about an action game with no upper score limit and no way to verify the score on the server by replaying moves etc. What I really need is the strongest encryption possible in Flash/PHP, and a way to prevent people calling the PHP page…
Iain
  • 9,432
  • 11
  • 47
  • 64
99
votes
2 answers

How to detect when a youtube video finishes playing?

I am working on a site that has a ton of embedded youtube videos, the client wants to show a popup whenever a video stops splaying. I looked at the youtube api and there seems to be a way to detect when a video…
user967451
63
votes
16 answers

Generate A Weighted Random Number

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…
Todd Sharp
  • 3,207
  • 2
  • 19
  • 27
62
votes
6 answers

IntelliJ IDEA 12 -- viewing the call stack

I'm new to the IntelliJ IDE (usually work with Visual Studio) and I'd like to view the current call stack at a particular breakpoint. I've found information on building a call hierarchy but that's not what I'm looking for. Any information on how to…
Monwe
  • 677
  • 1
  • 5
  • 7
50
votes
2 answers

How to make use of play2() function in order to perform fast stream switching of videos?

I am currently working on a Flash webplayer with resolution switching functionality. I am trying to make use of the NetStream class's play2() function in Actionscript. The problem I am running into is that the videos don't change quickly. For those…
funseiki
  • 9,167
  • 9
  • 36
  • 59
46
votes
3 answers

How do I get from an instance of a class to a Class object in ActionScript 3?

How do you get an instance of the actionscript class Class from an instance of that class? In Python, this would be x.__class__; in Java, x.getClass();. I'm aware that certain terrible hacks exist to do this, but I'm looking for a built-in language…
Glyph
  • 31,152
  • 11
  • 87
  • 129
43
votes
8 answers

What is the best standard style for a toString implementation?

We have a lot of objects for which we like to implement a simple toString to output attributes of the object. Some of these attributes may be complex objects themselves. Is there any standard, or simply just a best practice for a style? I'm…
Nicole
  • 32,841
  • 11
  • 75
  • 101
40
votes
17 answers

What is the best way to get the minimum or maximum value from an Array of numbers?

Let's say I have an Array of numbers: [2,3,3,4,2,2,5,6,7,2] What is the best way to find the minimum or maximum value in that Array? Right now, to get the maximum, I am looping through the Array, and resetting a variable to the value if it is…
34
votes
6 answers

Static Actionscript code analysis possibilities

I want to see class, function and variable/property, dependencies visually, like NDepend, but for ActionScript 2 or AS3 code. Any programs or ideas? Use doxygen in some way? FlexUnit?
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
32
votes
6 answers

How can I get an instance's "memory location" in ActionScript?

FlexBuilder's debugger will show you the "memory location" (or, I can only assume, something roughly analogous) of any in-scope instance: But I'd like to get this information in code (sort of like Python's id function), so I could very easily trace…
David Wolever
  • 148,955
  • 89
  • 346
  • 502
30
votes
3 answers

Get size of ActionScript 3 Dictionary

var d:Dictionary = new Dictionary(); d["a"] = "b"; d["b"] = "z"; How to get the length/size of the dictionary (which is 2) ?
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
28
votes
4 answers

Test if an object is defined in ActionScript

In ActionScript, how can you test if an object is defined, that is, not null?
Matthew Shanley
  • 1,091
  • 2
  • 11
  • 14
27
votes
9 answers

See trace() of Flash when running in browser

What's an easy way to see the trace() output of Flash/Flex movies when running in any browser?
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
27
votes
11 answers

Best Tools for Debugging Flash ActionScript 3 (AS3)

Does anyone want to share the best debugging tools they have found for Actionscript 3 (AS3) and Flash CS5? I've just done a search and found a few, but would love to hear from people who've actually used any of them. (In order of 'most…
Simon East
  • 55,742
  • 17
  • 139
  • 133
1
2 3
99 100