Questions tagged [actionscript-3]

ActionScript 3 (AS3) is the open source object oriented programming (OOP) language of the Adobe Flash and AIR Platforms. AS3 is widely used for RIAs, mobile apps, and desktop applications. (ActionScript 3 is a dialect of ECMAScript.)

ActionScript 3 (AS3), developed by Adobe, is an open source, object-oriented programming (OOP) language. It is a dialect of ECMAScript.

AS3 can be used to create web programs deployed using Flash Player, applications for iOS, Android, Blackberry (PlayBook OS and BlackBerry 10), and desktop using Adobe AIR, as well as TV applications using Adobe AIR for TV.

ActionScript is an object-oriented language originally developed by Macromedia Inc. (now owned by Adobe Systems). It is a dialect of ECMAScript (meaning it is a superset of the syntax and semantics of the language more widely known as JavaScript), and is used primarily for the development of websites and software targeting the Adobe Flash Player platform, used on Web pages in the form of embedded SWF files. The language itself is open-source in that its specification is offered free of charge and both an open source compiler (as part of Apache Flex) and open source virtual machine (Mozilla Tamarin) are available.

References:

Books:

Useful Links:

41246 questions
14
votes
14 answers

Using RegEx how do I remove the trailing zeros from a decimal number

I'm needing to write some regex that takes a number and removes any trailing zeros after a decimal point. The language is Actionscript 3. So I would like to write: var result:String = theStringOfTheNumber.replace( [ the regex ], "" ); So for…
user2190690
  • 1,744
  • 4
  • 24
  • 31
14
votes
1 answer

How can I move bones of a loaded asset programmatically in Away3D?

I'm loading a 3D asset into a Away3D scene and I'd like to move the position of the bones in code. The asset loading all goes well, I grab a pointer to the Mesh and Skeleton while loading: private function onAssetComplete(evt:AssetEvent):void { …
bummzack
  • 5,805
  • 1
  • 26
  • 45
14
votes
5 answers

Best way to remove all elements from an ActionScript Array?

I'm writing an application in Flex / ActionScript and have a number of class member variables of type Array storing data. My question is: what's the "best" way to clear out an Array object? I noticed the ArrayCollection class has a function…
Chris R
  • 2,875
  • 2
  • 28
  • 29
14
votes
1 answer

Trace on Chrome/Browser console

Does anybody know how to trace messages in the google chrome console using Flex3. In the logs section for example.
Dave
  • 598
  • 2
  • 4
  • 17
14
votes
2 answers

Flash/AIR Stage Video on iOS - Is It Possible? How is the performance?

Does any of you can point me to some resource about video performance of AIR (3.2) on iOS devices. I am interested into: is StageVideo available is video streaming allowed/enabled is the performance ok with high definition videos? is .flv playback…
Adrian Pirvulescu
  • 4,308
  • 3
  • 30
  • 47
13
votes
1 answer

problem sending bytes through an AS3 Socket to my FTP site

I have some as3 code which successfully opens 2 socket connections to my FTP server. One for commands and one for data. I am using the STOR command to create a file on the FTP server and then sending an encoded jpeg from a byteArray using…
Kevin
  • 169
  • 6
13
votes
3 answers

What Causes Flash Error #2012 (Can't instantiate class)?

I am new to ActionScript 3 and have run into a problem: Using Flex Builder 3, I have a created a project with a few simple classes. If code in class A instantiates an object of class B (class B is in its own source file) then the code compiles fine,…
Bob F
13
votes
3 answers

For-Each Loop AS3: Is the direction guaranteed?

I would like to know the iteration order for the Array, Dictionary and Object types in AS3, for both the for-each and the for-in loops. Also what factors can change the iteration order of these loop type combinations? For example I presume that…
BefittingTheorem
  • 10,459
  • 15
  • 69
  • 96
13
votes
3 answers

Hand Cursor when rolling over MovieClips in AS3

My goal is to simply have the cursor swap to be a hand (pointer) when I roll over a MovieClip. Obviously I could use SimpleButton, but the situation is that I have some enemies that are obviously MovieClips, and when I select an ability to use I…
Marty
  • 39,033
  • 19
  • 93
  • 162
13
votes
1 answer

What are the pro and cons of using Haxe over Actionscript-3?

I'm thinking about using Haxe in place of AS3. What are the disadventages of that? I can think about: Difficulties with using native AS3 libraries. Difficulity of debugging after language translation. Haxe is quite young, it may have some rough…
Łukasz Lew
  • 48,526
  • 41
  • 139
  • 208
13
votes
8 answers

What's the cleanest way to simulate pass-by-reference in Actionscript 3.0?

Actionscript 3.0 (and I assume Javascript and ECMAScript in general) lacks pass-by-reference for native types like ints. As a result I'm finding getting values back from a function really clunky. What's the normal pattern to work around this? For…
Matt W
  • 371
  • 1
  • 4
  • 13
13
votes
4 answers

How to get all definitions in an ApplicationDomain of a loaded SWF?

When you load a SWF into another, the loader SWF can get specific definitions from the loaded SWF using ApplicationDomain.getDefinition(name:String). For example: package { // ... imports public class SWFLoader extends Sprite { …
Lucas Gabriel Sánchez
  • 40,116
  • 20
  • 56
  • 83
13
votes
7 answers

Load profile image from Facebook with Actionscript 3

I'm trying to load profile images (friend images) from Facebook with AS3 but I seem to be running into a security issue. I'm currently using the "official" Adobe Facebook API for Actionscript 3 which works fine. However, I seem to be having trouble…
Luke
  • 20,878
  • 35
  • 119
  • 178
13
votes
3 answers

AS3 / AIR - Creating a plain text file?

is it possible to create a plain text file with AS3 or AIR? example: i would like to create a plain text file named "MyTextFile.txt", have it contain text that reads "This is my text file." and save it to my desktop. another option would be to have…
Chunky Chunk
  • 16,553
  • 15
  • 84
  • 162
13
votes
1 answer

How does binding in ActionScript work?

As far as I understand, binding to a var in ActionScript is carried out via events which are automatically fired when a var is changed. I have a few questions about this: What happens if the class doesn't explicitly extend EventDispatcher? Is there…
Grokys
  • 16,228
  • 14
  • 69
  • 101