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
24
votes
8 answers

Flex: Text Input that accepts number only

Need a code that only accepts numbers. Upon inputting, the code must check if it is number, if not, it must remove the entered key or not enter it at all
Treby
  • 1,328
  • 6
  • 18
  • 26
23
votes
3 answers

What does [Bindable] mean in actionscript?

[Bindable] /** * Display output of video device. */ public var videoLocal : Video; Anyone knows?
ollydbg
  • 3,475
  • 7
  • 28
  • 29
22
votes
7 answers

How to check if two objects are of the same type in Actionscript?

I want to do this in Actionscript: typeof(control1) != typeof(control2) to test if two objects are of the same type. This would work just fine in C#, but in Actionscript it doesnt. In fact it returns 'object' for both typeof() expressions because…
Simon_Weaver
  • 140,023
  • 84
  • 646
  • 689
22
votes
8 answers

Is it possible to do a traceroute in the browser?

I'm looking for a way to do a traceroute client-side, i.e. in a browser. As far as I know, it's not possible to send ICMP, UDP or TCP packets with arbitrary TTL values via Javascript or Flash. I know Flash allows TCP connections via the Socket class…
Franck
  • 6,285
  • 5
  • 26
  • 35
21
votes
1 answer

WebSockets vs raw TCP sockets in Flash

What WebSockets add to raw TCP connection? Why should I use WebSockets? I'd like to hear cons and pros like: Good: WebSockets add some useful things like autoreconnection, session ids, etc. Bad: WebSockets add a lot of overhead I'll have only…
luchaninov
  • 6,792
  • 6
  • 60
  • 75
21
votes
13 answers

Most useful ActionScript packages / libraries

What are some useful plug-ins, packages or source-code for ActionScript? Please include ActionScript version, name, link and description.
Kenneth J
  • 4,846
  • 11
  • 39
  • 56
20
votes
3 answers

Flash Actionscript 3 Bug? Using an int and negative numbers in a switch/case

Running this code var myValue1:int = 2; switch (myValue1) { case -3: trace(myValue1 + " == -3"); break; case -2: trace(myValue1 + " == -2"); break; case -1: trace(myValue1 + " == -1"); break; case 0: trace(myValue1 + " == 0");…
19
votes
11 answers

What tools do I need to develop in ActionScript (in Linux)

I've never developed Flash before but I have a project where I want to use an ActionScript 3 library and I'm not sure what tools I need to start. To further complicate things my main development box is an Ubuntu box. Are there any necessary packages…
Steven Noble
  • 10,204
  • 13
  • 45
  • 57
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
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
5 answers

Download a file with Adobe AIR

How do I download a file from the internet in a Flex based AIR application. I tried using a file with url set to the address, but I got a file does not exist error when I tried to save it. And it is really hard to google for help on this issue.
AlexH
  • 2,827
  • 7
  • 31
  • 30
18
votes
3 answers

actionscript (flex): how to know whether a property of object exists (or defined)?

I am a Java developer who tries Flex. Here is my problem: I behave actionScript objects as hashmap but when the object do not have the property it gives exception: No such variable. Here I expect it gave me null, instead of giving exception. So do…
enesness
  • 3,123
  • 5
  • 31
  • 33
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
7 answers

ActionScript 3.0 + Calculate timespan between two dates?

In ActionScript 3.0, is there an automatic way to calculate the number of days, hours, minutes and seconds between two specified dates? Basicly, what I need is the ActionScript equivalent of the .NET Timespan class. Any idea?
FlySwat
  • 172,459
  • 74
  • 246
  • 311