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

Reading the text file line by line and push to an array in AS3

I need some code in AS3 that will read a text file line by line and insert it into an array. Is this possible without having any special character? sample.txt car van scooter bike I need to read the file and insert it into an array…
vineth
  • 873
  • 5
  • 33
  • 57
10
votes
3 answers

touch events vs mouse click events using actionscript 3

Just wanted to ask if there is any advantage for either using mouse click event or touch tap events, when writing apps for mobiles or tablets (for the iphone especially)? I know that both of them should work fine, but in term of performance, is…
Adam S
  • 115
  • 1
  • 1
  • 5
10
votes
3 answers

Best way to get the color where a mouse was clicked in AS3

I have an image (mx) and i want to get the uint of the pixel that was clicked. Any ideas?
Cameron A. Ellis
  • 3,833
  • 8
  • 38
  • 46
10
votes
3 answers

Event Bubbling, and Stop Propagation

What is the difference between event.bubbles to false for any event, and setting event.stopPropagation() or stopImmediatePropagation() while handling event? I'm using Flex4 with AS3.
10
votes
3 answers

How to control a spark Datagrid's scroller position in Flex?

I'm using the new Spark Datagrid for a project, but I must confess the scroller is annoying me a little bit, so I would like to have some control over it. In other words, I would like to programatically set the Datagrid scroller position to the…
Felipe
  • 11,557
  • 7
  • 56
  • 103
10
votes
2 answers

new Date().time or new Date.getTime() returning negative number?

if I trace new Date().toUTCString() I get something like: Fri Aug 12 07:14:06 2011 UTC. perfect. If I trace new Date().getTime() I get some long negative number which is decreasing as I continue to trace it. This is totally unexpected. Obviously my…
Tom Auger
  • 19,421
  • 22
  • 81
  • 104
10
votes
1 answer

Convert pixel location to latitude/longitude & vise versa

I need to convert latitude longitude values into pixel positions as well as do the opposite. I've found many solutions to go from lat/lng->pixel, but can't find anything on the reverse. A couple of notes: The map is a fixed size, no zooming, no…
Tyler Egeto
  • 5,505
  • 3
  • 21
  • 29
10
votes
2 answers

Flex clarification needed: width, min(max)Width, explicitWidth, explicitMin(Max)Width, measuredWidth, measuredMinWidth, percentWidth

Is anyone able to shortly explain the meaning of the different Flex size properties in a comprehensible way? What I have so far: Actual size width and height. This is the actual (and final) size of the component. If not set explicitly it will be the…
Kaken Bok
  • 3,395
  • 1
  • 19
  • 21
10
votes
3 answers

Sending and receiving data from Flash AS3 to PHP

I know this is frequently asked, but I have looked all over the internet to find the mistake I'm making with the code I've used to send and receive data from AS3 to PHP and viceversa. Can you find the mistake? Here is my code: AS3: import…
Julio Mendoza
  • 310
  • 1
  • 4
  • 11
10
votes
8 answers

What would you use to zero pad a number in Flex/AS3?

Duplicate of this one. What would you use to pad zeroes to the left of a number in Flex/AS3? Is there an equivalent to printf or NumberFormat that does this? I'm looking for the nicest implementation of this or something similar: public function…
lpfavreau
  • 12,871
  • 5
  • 32
  • 36
10
votes
5 answers

AS3: setting registration point of a DisplayObject with actionscript?

How would you set the registration point on a Sprite or Shape via actionscript (I know this is trivial using Flash, but I need to do it purely in actionscript)
Ronn
  • 1,753
  • 4
  • 28
  • 38
10
votes
2 answers

Why is Flash demanding a crossdomain.xml file when the .swf and http target are both on localhost?

I've got a small client/server test application where I have a Flex app that makes an HTTP request of a server app. The server app is a script running on my local machine, listening on port 8001. The client is a swf that I am running locally, and…
Russ
  • 10,835
  • 12
  • 42
  • 57
10
votes
7 answers

Logging API for AS3

quick question, I've been looking for a simple logging tool for AS3 projects (I do not want any Flex dependencies) and my impression so far has been that there is no actively developed project. What I need is basic logging, and adapters to allow me…
BefittingTheorem
  • 10,459
  • 15
  • 69
  • 96
10
votes
3 answers

Can a JavaScript function detect which Flash DOM object called it?

Here's the challenge: I have a Flash movie which will be embedded in a page using an unknown DOM ID that I want to be able to identify/store for callback in a JS function. My ideal user flow would be: User clicks button in Flash. Flash pauses any…
Joshua Sullivan
  • 1,073
  • 8
  • 12
10
votes
5 answers

Immutable Collections Actionscript 3

I've been trying lately to implement some clean coding practices in AS3. One of these has been to not give away references to Arrays from a containing object. The point being that I control addition and removal from one Class and all other users of…
BefittingTheorem
  • 10,459
  • 15
  • 69
  • 96