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
11
votes
2 answers

Get class name from Class object

I have a Class object, and besides finding the class name of an object, is it possible to get the class name from the Class object?
NebulaFox
  • 7,813
  • 9
  • 47
  • 65
11
votes
2 answers

Why does delete( DictionaryInstance[ key ] ); fail?

My app uses a Dictionary protected _categoryToValueDict:Dictionary = new Dictionary(); to map something to something else. Now, at a certain point in the application, I need to remove a certain key from the Dictionary. I implemented this simple…
SteAp
  • 11,853
  • 10
  • 53
  • 88
11
votes
2 answers

How can you overload a function in ActionScript?

I want a function to be able to take in various types. AS3 doesn't support overloading directly... so I can't do the following: //THIS ISN'T SUPPORTED BY AS3 function someFunction(xx:int, yy:int, someBoolean:Boolean = true){ //blah blah…
AS3 Guy
  • 111
  • 1
  • 1
  • 3
11
votes
3 answers

Actionscript: Why is it possible to assign a variable before it is declared?

inspired by the question int a[] = {1,2,}; Weird comma allowed. Any particular reason? I remembered a question concerning the syntax in Adobe's Actionscript. For some reason it is possible (at least in Flex 3) to assign a value to a variable before…
11
votes
5 answers

Best Class for base64 encoding/decoding Action Script?

What would be a best Class for base64 encryption/decryption in Action Script?
jayarjo
  • 16,124
  • 24
  • 94
  • 138
11
votes
6 answers

Is there a way to build a Flash 9 SWF from an FLA file without using the Flash IDE?

Two reasons this would be useful, in case there's some other way to achieve these goals: 1) Building in the Flash IDE is really slow; I was hoping a third-party compiler would be faster. 2) It would be nice to be able to build projects on machines…
Yossi Horowitz
11
votes
1 answer

Flash as3 understanding localToGlobal

I'm just having a little bit of trouble understanding Flash's localToGlobal functionality. I have a movieClip, which is nested inside a whole bunch of other movieclips. When that nested clip is clicked, I want to find its position, and moved the…
mheavers
  • 29,530
  • 58
  • 194
  • 315
11
votes
2 answers

Custom metadata in AS3/Flex?

How to create and to work with custom metadata in ActionScript3/Flex?
Timofei Davydik
  • 7,244
  • 7
  • 33
  • 59
11
votes
1 answer

Creating anonymous functions in loop with not the same arguments

I want to make in loop set of buttons, and add to them some events, but anonymous functions is the same. I write example code: for(var i:int=0;i<5;i++) { var button:SimpleButton = new SimpleButton(...); ... …
onio9
  • 111
  • 4
11
votes
6 answers

Data binding will not be able to detect assignments to "topLevelApplication"

I am migrating an application from Flex 3 to Flex 4. In some cases there are popup windows of which the width and height is bound to the application width and height. width="{Application.application.width - 24}"…
Bocaxica
  • 3,911
  • 3
  • 37
  • 54
11
votes
3 answers

For-loop variable scope confusion

I have noticed a weird behavior of the variables in for loops. It's not really a problem, but it disturbs me a lot. Actually I've created two loops this way: for (var i:uint; i<19; i++) SomeFunction (i); for (var i:uint; i<26; i++) SomeOtherFunction…
rhino
  • 13,543
  • 9
  • 37
  • 39
11
votes
2 answers

Flex 4 Scroller

Within my application I'm using a Scroller component. I can't seem to figure out which event I should set up a listener on in order to know when content is scrolled. I tried Event.CHANGE on Scroller.verticalScrollBar property but apparently that…
Andrey
  • 8,882
  • 10
  • 58
  • 82
11
votes
3 answers

Finding the center of mass on a 2D bitmap

I'm coding a game, and I'd like to be able to find the center of mass of an arbitrary shape on a black and white bitmap such as this: 012345678 0.XX...... 1..XXX.... 2...XXX... 3..XXXXXXX 4...XXX... All "cells" have the same weight. Diagonally…
grapefrukt
  • 27,016
  • 6
  • 49
  • 73
11
votes
6 answers

Flex's FileReference.save() can only be called in a user event handler -- how can I get around this?

I need to call FileReference.save() after a web service call has completed, but this method has a restriction: "In Flash Player, you can only call this method successfully in response to a user event (for example, in an event handler for a mouse…
James Adams
  • 8,448
  • 21
  • 89
  • 148
11
votes
7 answers

How to put\save files into your application directory? (adobe air)

How to put\save files into your application directory? (adobe air) (code example, please)
Rella
  • 65,003
  • 109
  • 363
  • 636