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
17
votes
23 answers

Hidden features/tricks of Flash development, Flash language (AS2/3), and Flash IDE

Guys, I am thoroughly surprised that there is no Flash Hidden Features post yet in the Hidden Features series that I've been tracking for a while now. There is a recent AS3/Flex one but it's not very active and I don't exactly mean just AS3 when I…
Artem Russakovskii
  • 21,516
  • 18
  • 92
  • 115
16
votes
5 answers

How do you load a bitmap file into a BitmapData object?

In Flash, the BitmapData object can be used to store bitmaps in RAM, you can later draw them to a MovieClip using the beginBitmapFill() method. How do you load an external bitmap file (.jpg) into a BitmapData object? Even AS3 code would be helpful.
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
16
votes
2 answers

What thread does JavaScript code called from Flash execute on?

As far as I understand, all JavaScript code is event-driven and executes on a single browser thread. However, I have some JavaScript functions that are called from within a SWF object sitting on the same page. Is this code run in the same manner as…
16
votes
6 answers

Lint tool for actionscript?

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…
Scotty Allen
  • 12,897
  • 9
  • 38
  • 51
16
votes
9 answers

Flash / Actionscript CPU profiler

Have you found such a tool and used it successfully?
joeysim
  • 494
  • 1
  • 4
  • 13
16
votes
8 answers

Convert camel case to human readable string?

Is there a reg exp or function that will convert camel case, css and underscore to human readable format? It does not need to support non-humans at this time. Sorry aliens. :( Examples: helloWorld -> "Hello World" hello-world -> "Hello…
1.21 gigawatts
  • 16,517
  • 32
  • 123
  • 231
15
votes
2 answers

Difference between stage.width and stage.stageWidth

In actionscript 3 (as3) What is the difference between calling stage.width and stage.stageWidth This was something I remember I got confused about in the past (Adobe's api docs are an artform in obfuscation :) ). Thought I should post it on…
eLouai
  • 696
  • 1
  • 8
  • 21
15
votes
2 answers

In Actionscript 3, what is the difference between the "in" operator and the "hasOwnProperty" method?

The "in" operator and "hasOwnProperty" methods appear to be interchangeable, but I'm wondering if one is checking for inherited properties or something and the other isn't or something like that. I'm especially interested in the case of using it…
Michael Meyer
  • 291
  • 2
  • 8
15
votes
6 answers

Asynchronous function call in Flex

Is it possible to call a function asynchronously in Flex? I want to parse a file at regular intervals without blocking the rest of the application, what is the recommended approach for this?
Abdullah Jibaly
  • 53,220
  • 42
  • 124
  • 197
15
votes
2 answers

StringBuilder in Flex

I'm looking for fast string concatenation class or so in Flex. Like StringBuilder in Java. Thanks
tefozi
  • 5,390
  • 5
  • 38
  • 52
15
votes
5 answers

UDP real-time games in Flash/Flex available Open source RTMFP implementation

Are there any examples of using the Flash 10 beta RTMFP UDP based protocol to build real-time Flash games. The RTMFP examples so far seem to focus on P2P networking between flash clients does anyone know of any examples of traditional client/server…
Dougnukem
  • 14,709
  • 24
  • 89
  • 130
15
votes
5 answers

Vector.<> vs array

What are the pros and contras of using a Vector.<> instead of array?
Ilya Boyandin
  • 3,069
  • 25
  • 23
15
votes
8 answers

For VS Foreach on Array performance (in AS3/Flex)

Which one is faster? Why? var messages:Array = [.....] // 1 - for var len:int = messages.length; for (var i:int = 0; i < len; i++) { var o:Object = messages[i]; // ... } // 2 - foreach for each (var o:Object in messages) { // ... }
oshyshko
  • 2,008
  • 2
  • 21
  • 31
14
votes
6 answers

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

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) { …
14
votes
5 answers

Actionscript - Obtain the name of the current function

I want to get the name of a function from inside that function. e.g.: function blah() { //I want to get the string "blah" here, from the function's name } Or at least the Function object?
Fragsworth
  • 33,919
  • 27
  • 84
  • 97