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
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
1 answer

Regex to check if first 2 characters in a string are Alphabets

I'm new to actionscript and i cant seem to get the regex syntax right in actionscript3. The task is straight forward, i want to make sure that the first two characters in a given string are alphabets and nothing else. Here's what I'm doing and…
Nesta
  • 163
  • 1
  • 1
  • 4
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
5 answers

Actionscript flex: Converting # colors to uint

I'm working with several components that take color as a uint, but the colors I have are in the format of "#161616". I'm not sure what the relation between the 2 types of colors are or how to go from one to another. It doesn't have to be an…
Daryl
  • 247
  • 1
  • 2
  • 7
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
16
votes
8 answers

Detect Mouse leave stage while dragging in Actionscript 3

Event.MOUSE_LEAVE is great in Actionscript 3, but it doesn't seem to fire if the user is holding their left (or right for that matter) mouse button down. Is there a way to detect if the mouse leaves the Flash movie while the mouse is held down? Or…
Adam Harte
  • 10,369
  • 7
  • 52
  • 85
16
votes
8 answers

AS3: cast or "as"?

Is there any difference of use, efficiency or background technique between var mc:MovieClip = MovieClip(getChildByName("mc")); and var mc:MovieClip = getChildByName("mc") as MovieClip; ? The choice is just matter of convention, preference or are…
user1869316
16
votes
1 answer

Browsing multiple photos in flash for android

I am trying to develop an application for android phone using flash/as3, I want to know How to browse multiple photos from gallery using media promise or camera roll. Right now I am able to browse only one photo at a time. var…
Hegde
  • 481
  • 1
  • 8
  • 17
16
votes
3 answers

Get Current Operating System In Adobe Air

I'm making an App using Adobe Flex/Air. I was wondering if there is any way to get the Operating System the Air app is running on?
Joel
  • 16,474
  • 17
  • 72
  • 93
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
4 answers

AS3 - How to find the position of an object relative to the stage?

If I have a rectangle on the stage, how do I find its top left tip (x,y) and the bottom right tip (x,y) in relation to the stage? It strange how I can't find this on google!
muudles
  • 189
  • 1
  • 3
  • 8
15
votes
3 answers

Vector graphics flood fill algorithms?

I am working on a simple drawing application, and i need an algorithm to make flood fills. The user workflow will look like this (similar to Flash CS, just more simpler): the user draws straight lines on the workspace. These are treated as vectors,…
sydd
  • 1,824
  • 2
  • 30
  • 54
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