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

Parse durations in simple English

I would like to find an actionscript library that can take strings like: Two days 2h one month a week and parse them into duration (returning the time in some unit). It seems like it's been done so many times before and I'd hate to implement such…
Assaf Lavie
  • 73,079
  • 34
  • 148
  • 203
10
votes
2 answers

how to find specific xml data by attribute name/value in flex / actionscript

From some xml I want to find items that have a specific attribute and value. Here is example xml: dont want this one
Scott Szretter
  • 3,938
  • 11
  • 57
  • 76
10
votes
3 answers

How does [RemoteClass] work in Flex Actionscript can I use it for custom data-binding?

Actionscript supports a [RemoteClass] metadata tag that is used in BlazeDS to provide data-binding hints for marshalling AMF binary objects from Java to BlazeDS. For example: Java: package sample; public class UserInfo { private String…
Dougnukem
  • 14,709
  • 24
  • 89
  • 130
10
votes
4 answers

How to create an object form a string in actionscript 3.0 (as3)

How can I create a dynamic object from a string? Here is my current code with incorrect results: var s1:String = '{x:200, y:400}'; var o1:Object = Object(s1); trace(o1); // result = {x:200, y:400} trace(o1.x) // result = ReferenceError: Error…
Ben
10
votes
5 answers

Add days to Date in ActionScript

We have an application in which the user has to enter a date who's value is no more than 30 days after the the current date (the date on which the user uses the application). This is a Flash application, therefore I need a way to add 30 days to the…
Lea Cohen
  • 7,990
  • 18
  • 73
  • 99
10
votes
7 answers

How do I access cookies within Flash?

I'm looking to grab cookie values for the same domain within a Flash movie. Is this possible? Let's see I let a user set a variable foo and I store it using any web programming language. I can access it easily via that language, but I would like…
Chris Bartow
  • 14,873
  • 11
  • 43
  • 46
10
votes
4 answers

Flex: given Class object, get the name of the class it represents

In Flex, say I have a Class object. How do I get a string for the class it represents? e.g.: var clazz:Class= String; trace(clazz); // this gives "[class String]" but what I want is "String"
paleozogt
  • 6,393
  • 11
  • 51
  • 94
9
votes
2 answers

Skip first element in "for each" loop?

I have an array of sprites called segments and I would like to skip the first element of segments in my for each loop. I'm doing this at the moment: var first = true; for each (var segment in this.segments) { if(!first) { // do…
James Dawson
  • 5,309
  • 20
  • 72
  • 126
9
votes
3 answers

What is the difference between object main timeline, object Stage and root in as3?

I want to know the difference between [object main timeline], [object Stage] and root in as3? I have read from the topic How stage, root, and MainTimeline Fit Together. But I didn't get clearly.
Benny
  • 2,250
  • 4
  • 26
  • 39
9
votes
2 answers

filling in (...rest) parameters with an array?

Some as3 functions handle overloading by allowing for an arbitrary number of parameters using the convention: public function doSomething( ... rest ):void; I am in a situation where I need to pass all the values of an array (of arbitrary length)…
jedierikb
  • 12,752
  • 22
  • 95
  • 166
9
votes
5 answers

Securely provide a unique secret code to winner of flash game?

Here's what I want to do: when a player wins a game (coded in flash/actionscript), they are given a personalized secret key, which they can email to me in exchange for a prize. I can then validate the key on my end using a private algorithm. I need…
Ben
  • 93
  • 2
9
votes
2 answers

Actionscript Date Comparison

In my Actionscript code I have two dates: var date1:Date = new Date(2011,1,1); var date2:Date = new Date(2011,1,1); This doesn't work: var equal:Boolean = date1 == date2; From reading I've found that this is a working alternative since it just…
Ocelot20
  • 10,510
  • 11
  • 55
  • 96
9
votes
1 answer

as3 scanHardware() function making my app crash

I am using ScanHardware function to get the updated Camera list. If plug in a Camera to my Mac mini, Camera length is being updated. If I plug out the Camera My app closes abruptly.
Vishnu
  • 11,614
  • 6
  • 51
  • 90
9
votes
8 answers

How do I learn Flash Game Development?

I'm currently a PHP programmer and one of my childhood dreams is to create a game. The problem is I don't know Flash. I'm not great at drawing stuff or even artistic. I could program a little with JavaScript and I could consider myself intermediate…
user295284
  • 369
  • 2
  • 4
  • 16
9
votes
1 answer

Possible to pass parameters to a skin?

I have 2 skins, almost identical, but differ in 1 small way that can be accounted for if I could pass a Boolean to the skin while assigning it to the host component (a button). Is there a way while assigning the…
nick
  • 93
  • 1
  • 4