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
316
votes
10 answers

Difference between e.target and e.currentTarget

I don't understand the difference, they both seem the same but I guess they are not. Any examples of when to use one or the other would be appreciated.
Artemix
  • 8,497
  • 14
  • 48
  • 75
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
181
votes
7 answers

Call AngularJS from legacy code

I'm using AngularJS to build HTML controls that interact with a legacy Flex application. All callbacks from the Flex app must be attached to the DOM window. For example (in AS3) ExternalInterface.call("save", data); Will call window.save =…
kreek
  • 8,774
  • 8
  • 44
  • 69
148
votes
1 answer

Trying to login to RDP using AS3

I am trying to login to RDP using AS3 (air). I am doing ok, considering the lack of resources out there to understand the actual process. I have gotten past the initial sending username, received a response from server, and I am now at initial…
Brendan Mcdonagh
  • 1,481
  • 1
  • 9
  • 3
125
votes
6 answers

Does PNG contain EXIF data like JPG?

I was wondering if PNG contains data like the following? What I did was to convert the jpg file to png format, and I was expecting to retrieve the same info I had on the jpg as below: Currently using this as3 library to read the data. IDF0--- IDF…
user1004413
  • 2,509
  • 6
  • 23
  • 33
96
votes
8 answers

How to unload a ByteArray using Actionscript 3?

How do I forcefully unload a ByteArray from memory using ActionScript 3? I have tried the following: // First non-working solution byteArray.length = 0; byteArray = new ByteArray(); // Second non-working solution for ( var i:int=0; i <…
maclema
85
votes
5 answers

How to create and use nonces

I am running a website, and there is a scoring system that gives you points for the number of times you play a game. It uses hashing to prove the integrity of http request for scoring so users cannot change anything, however as I feared might…
Malfist
  • 31,179
  • 61
  • 182
  • 269
82
votes
12 answers

Calculate Bounding box coordinates from a rotated rectangle

I have the coordinates of the top left point of a rectangle as well as its width, height and rotation from 0 to 180 and -0 to -180. I am trying to get the bounding coordinates of the actual box around the rectangle. What is a simple way of…
coulix
  • 3,328
  • 6
  • 55
  • 81
59
votes
1 answer

What are the major performance hitters in AS3 aside from rendering vectors?

In ActionScript 3, using vector graphics is a guaranteed way to cause massive damage to the performance of your project. Using a single Bitmap for all graphics by using .copyPixels() through its BitmapData object in place of all vector graphics will…
Marty
  • 39,033
  • 19
  • 93
  • 162
54
votes
3 answers

SQLStatement.execute() - multiple queries in one statement

I've written a database generation script in SQL and want to execute it in my Adobe AIR application: Create Table tRole ( roleID integer Primary Key ,roleName varchar(40) ); Create Table tFile ( fileID integer Primary Key ,fileName…
Shawn
  • 19,465
  • 20
  • 98
  • 152
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
45
votes
2 answers

Efficient looping through AS3 dictionary

for (var k in dictionary) { var key:KeyType = KeyType(k); var value:ValType = ValType(dictionary[k]); // <-- lookup // do stuff } This is what I use to loop through the entries in a dictionary. As you can see in every iteration I perform a…
Bart van Heukelom
  • 43,244
  • 59
  • 186
  • 301
43
votes
12 answers

Insert commas into number string

Hey there, I'm trying to perform a backwards regular expression search on a string to divide it into groups of 3 digits. As far as i can see from the AS3 documentation, searching backwards is not possible in the reg ex engine. The point of this…
BefittingTheorem
  • 10,459
  • 15
  • 69
  • 96
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…
1
2 3
99 100