Questions tagged [actionscript]

ActionScript is a scripting language used to create Rich Internet Applications (RIA), mobiles applications, web applications, etc. It is the main language for Flash and Flex.

ActionScript is an object-oriented programming language originally developed by Macromedia (now dissolved into Adobe Systems). Its latest version is ActionScript 3.

It is used to create web applications (including RIAs), desktop applications and mobile applications. The web target is served using the Adobe Flash Player runtime, while the desktop and mobile targets are served using the Adobe AIR (previously Adobe Integrated Runtime).

Popular IDEs are Adobe Animate (rebranded from Adobe Flash), Adobe Flash Builder, FlashDevelop, IntelliJ and others.

Some of the popular compilers are Adobe Animate, Apache Flex, Haxe, OpenFL and others.

Adobe Scout and FlashFirebug can be used to debug the Adobe AIR and the Adobe Flash Player runtimes.

9141 questions
14
votes
5 answers

Best way to remove all elements from an ActionScript Array?

I'm writing an application in Flex / ActionScript and have a number of class member variables of type Array storing data. My question is: what's the "best" way to clear out an Array object? I noticed the ArrayCollection class has a function…
Chris R
  • 2,875
  • 2
  • 28
  • 29
12
votes
3 answers

Cleaning up HTML formatted content for display within Flash?

I want to display HTML formatted content from various sources inside a Flash Flex application. Flash supports HTML formatting in its text fields, however it is very limited compared to a web browser. Are there any scripts out there that will convert…
davr
  • 18,877
  • 17
  • 76
  • 99
12
votes
7 answers

can an actionscript function find out its own name?

given the following function A(b:Function) { } If function A(), can we determine the name of the function being passed in as parameter 'b' ? Does the answer differ for AS2 and AS3 ?
Rotem Hadary
12
votes
6 answers

How can I convert a simple XMLList to an Array of Strings without a loop?

How can I convert the following XMLList to an Array of Strings without using a loop?
Eric Belair
  • 10,574
  • 13
  • 75
  • 116
12
votes
2 answers

Re-dispatching event in FLEX

In a FLEX app, I am trying to "re-dispatch" a custom event. I.e. component1 does dispatchEvnet(event), component2 registers a handler for the event, the only function of the handler being, again, dispatch(event). Finally, component3 listens for the…
user8032
  • 1,221
  • 1
  • 9
  • 17
12
votes
2 answers

bring object to front flash actionscript 3

I have a menu set up that has about 20 menu items in a circle. When you mouse over each item, a title comes up. The only problem is that because of the depth order, it's hidden behind the other menu items. Is there a way to bring this item to the…
steve
  • 688
  • 6
  • 13
  • 32
12
votes
9 answers

Should I Abandon Adobe Flash for HTML5 and ?

I'm currently looking into developing Facebook applications and was planning on using Flash as the basis of my application, I have test built some simple PHP Facebook applications and I know enough about action-script 3 to start me on my way, but…
Waltzy
  • 1,113
  • 4
  • 14
  • 31
12
votes
3 answers

How can I determine a function's argument count at runtime in Flex 3?

I want to pass an optional data parameter to some callbacks, but only to callbacks that support a single parameter; right now, I have a moderately-sized code base of callbacks that cannot accept a parameter at all. How can I check what parameters a…
Chris R
  • 17,546
  • 23
  • 105
  • 172
12
votes
3 answers

Check to see if a class has a method

Is it possible to check a class to see whether it has a method or not ? Or even a particular property
numerical25
  • 10,524
  • 36
  • 130
  • 209
12
votes
7 answers

Unit testing in flex

Are there any unit testing solutions for Flex? or actionscript 3? If so, what are their features? Any UI testing abilities? Functional testing? Any pointers, examples, libraries or tools that you can share?
Phobis
  • 7,524
  • 10
  • 47
  • 76
12
votes
10 answers

Is it possible to create a 'command line' swf?

I'd like to be able to write a .swf file that is runnable as a command line app. In other words, I would be able to create actionscript classes which can interact with stdin and stdout, and could then execute that .swf directly in the command…
Pete Hodgson
  • 15,644
  • 5
  • 38
  • 46
11
votes
4 answers

AS3: declaring an "undefined" parameter for int, uint or Number

I'd like to implement the following logic: function setMyValue (myVar:int = undefined):void { if (myVar == undefined) { /* Generate a value for myVar */ } else { /* Use the supplied value for myVar */ } } So…
Wikiup
  • 325
  • 1
  • 3
  • 10
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…