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
20
votes
13 answers

Asynchronous HTTP Client for Java

As a relative newbie in the Java world, I am finding many things frustratingly obtuse to accomplish that are relatively trivial in many other frameworks. A primary example is a simple solution for asynchronous http requests. Seeing as one doesn't…
helifreak
  • 1,303
  • 2
  • 11
  • 16
19
votes
2 answers

Server not picking up information from database and passing it to client

I am trying to get my server to get the sso from the logged in user (web) and pass that to an AS3 client. If I set a specific SSO in the client (bellow) the server picks up the user from the database. Currently I get the error: ERROR 1: You have an…
Sauced Apples
  • 1,163
  • 2
  • 14
  • 37
19
votes
4 answers

AS3: Checking if a variable is of the Object type

I want to do something like this in Actionscript 3: if(variable is Object) ...; else ...; Where variable could be a String(), Number(), Array(), Object()... Currently the above check returns true for all of these types, which makes sense. I only…
Tapio Saarinen
  • 2,499
  • 3
  • 20
  • 18
19
votes
4 answers

Possible to use Flex Framework/Components without using MXML?

Is it possible to use the Flex Framework and Components, without using MXML? I know ActionScript pretty decently, and don't feel like messing around with some new XML language just to get some simple UI in there. Can anyone provide an example…
davr
  • 18,877
  • 17
  • 76
  • 99
19
votes
6 answers

block third party cookies - workaround (facebook apps etc)

Safari on a Mac has a Block cookies set to From third parties and advertisers by default. It stops the SharedObject from working if the embedded swf is from a different domain. This problem isn't new: Safari 3rd party cookie iframe trick no longer…
sanchez
  • 4,519
  • 3
  • 23
  • 53
18
votes
5 answers

compiling actionscript from command line using MXMLC

I have a tiny actionscript "project" consisting of two files, call them foo.as and bar.as. For reasons I won't go into, I really really want to build the .SWF from the command line, without setting up a formal project of any kind. Every compiler…
I. J. Kennedy
  • 24,725
  • 16
  • 62
  • 87
18
votes
14 answers

How to deal with Number precision in Actionscript?

I have BigDecimal objects serialized with BlazeDS to Actionscript. Once they hit Actionscript as Number objects, they have values like: 140475.32 turns into 140475.31999999999998 How do I deal with this? The problem is that if I use a…
Mike Sickler
  • 33,662
  • 21
  • 64
  • 90
18
votes
8 answers

Force Garbage Collection in AS3?

Is it possible to programmatically force a full garbage collection run in ActionScript 3.0? Let's say I've created a bunch of Display objects with eventListeners and some of the DO's have been removed, some of the eventListeners have been triggered…
defmeta
  • 1,322
  • 3
  • 11
  • 19
17
votes
5 answers

ActionScript: Is there ever a good reason to use 'as' casting?

From what I understand of ActionScript, there are two kinds of casts: var bar0:Bar = someObj as Bar; // "as" casting var bar1:Bar = Bar(someObj); // "class name" casting (for want of a better name) Also, and please correct me if I'm wrong here, as…
David Wolever
  • 148,955
  • 89
  • 346
  • 502
17
votes
2 answers

ActionScript 3 .replace() only replaces first instance

In Flash ActionScript 3, I am trying to do something I thought was simple: replace all instances of a phrase in a text string with another phrase. However, for some reason only the first instance is replaced and the rest ignored. I hacked a solution…
Craig
  • 431
  • 1
  • 4
  • 12
17
votes
2 answers

Unit Testing AS3 Code for Flash

I'm trying to improve my code by writing unit tests for my ActionScript 3 code for Flash projects I work on, but I'm having a mental hurdle understanding how to deal with it in the context of a Flash program. I can't seem to wrap my head around how…
gunit888
  • 571
  • 6
  • 14
17
votes
5 answers

Cleanly merge two arrays in ActionScript (3.0)?

What's a nice way to merge two sorted arrays in ActionScript (specifically ActionScript 3.0)? The resulting array should be sorted and without duplicates.
mellis
  • 4,621
  • 4
  • 22
  • 10
17
votes
1 answer

Access HTTP response headers in for flash.net.URLLoader object?

Is there a way to access the response headers from an HTTP result when using Flash/Flex's URLLoader? Setting the request headers is possible, as is accessing the response code, but getting a hold of the actual response headers seems to be…
aaaidan
  • 7,093
  • 8
  • 66
  • 102
17
votes
1 answer

Flash AS3: ReferenceError: Error #1056: Cannot create property

I am writing something in Flash/ AS3, and I came across this problem: ReferenceError: Error #1056: Cannot create property txtInput on package.name.DocumentClasss Basically I have a document class, and I can create instances of movieclips clips and…
bguiz
  • 27,371
  • 47
  • 154
  • 243
17
votes
1 answer

Binding to a read-only getter in AS3

Consider the following code: [Bindable(event="ReportHeaderVO_effectiveFromDateJulian_updated")] public function set effectiveFromDateJulian ( value:Number ) : void { _effectiveFromDateJulian = value; dispatchEvent( new…
Ryan Guill
  • 13,558
  • 4
  • 37
  • 48