Adobe ActionScript 3 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.)

learn more… | top users | synonyms

2
votes
1answer
25 views

Creating error messages for grammar mistakes - avoiding duplication when refactoring

After my Dialogue parser has parsed a dialogue, it needs to be validated. To that end, I have several checker classes that go through the lines of the Dialogue. These checker classes get huge as I ...
1
vote
1answer
38 views

Fruit game using nape physics with refactoring to Builder Pattern

I am doing a game that uses nape physics in ActionScript, but my question isn't about language. It is about the use of patterns. I had fruits in my game. I did one interface ...
3
votes
1answer
35 views

Parsing a Dialogue Script - fixing my 620 line mess

Given a Dialogue Script for SDT (NSFW! Google at own risk), parse said dialogue script for validation with checkers. A dialogue script consists of a set of lines. There's a special line, ...
2
votes
1answer
47 views

Efficiently consolidating an array of objects

In my program, I'm getting Facebook objects and using temp to display on a separate screen how many unread messages they have. However, we have since decided to ...
10
votes
2answers
127 views

Simon-says in AS3 - Prototyping functionality

My non-serious entry for Simon Says. Based on literal interpretation of the rules: Create a UI with four colored buttons that light up in a random pattern. After displaying the pattern, the ...
11
votes
1answer
443 views

Case-insensitive String search in Array

Wrote this function for a Stack Overflow answer. It started off pretty bad but in the end I polished it a bit and now I have something I think to be pretty clean. Actually, when I look at the code, ...
3
votes
2answers
109 views

Game character sprite positioning and movement

The player will have different spells that can be cast on different keyboard key combinations. Right now what I have is one .as file with everything on it. A bunch of ...
10
votes
1answer
223 views

Making a square move counter-clockwise around the edge

This is so ugly code. There must be better way to write it, but I'm noob to AS3. The goal is to make a square move at even speed counter-clockwise around the edge and on call ...
3
votes
1answer
64 views

Simple expense tracker

I have posted below a small project of mine in AS3 regarding a super simple Expense Tracker. I finally made it basically functional, and I learnt A LOT in the way. But even I can tell that my design ...
3
votes
1answer
116 views

Do I need to remove these event listeners?

The following ActionScript code just downloads and attempts to parse some JSON from an API service. Inside the method I have defined a cleanUp() function, just to ...
6
votes
2answers
42 views

Reading code from array efficiently

I'm trying to read data from an array. I manage to get the information I want but my code is extremely inefficiently written. My array looks like this: ...
9
votes
1answer
171 views

Date range validation

The following code is ran when the user presses a button to generate a log file based on the date selected. The DatePicker has a restrictive selected date range of ...
0
votes
2answers
53 views

PRNG - Algorithm: Performance vs Readability

I have a PRNG-Algorithm: ...
1
vote
1answer
40 views

Seeding a PRNG - Custom Setter

I have a PRNG-Class called Generator. Now, after creating a new instance of it: var g:Generator = new Generator(); Custom ...
4
votes
1answer
36 views

Character Sprint Spaghetti Code

I finally managed to get the code to work properly. It makes the player object move faster if the user double taps the arrow key with a few 'ticks' (new frames) after the 1st stroke. - User presses ...
15
votes
2answers
224 views

UltimateTicTacToe - ActionScript Style!

In an effort to complete this month's code challenge, I've started off with the basics. Below I have for review, a class that I can call to create the square/button a user would click to mark a spot ...
3
votes
1answer
209 views

Actionscript Graph data structure implementation

So, I am not sure if I should have Vertex extend Point, because the equals() and ...
5
votes
3answers
300 views

Frogger game in Actionscript 3

I am creating a Frogger game in Flash AS3 and just wanted to see if anyone can help me improve it without breaking the game. The reason I ask for it because I don't have any errors, but I do get over ...
3
votes
1answer
311 views

Preload content in StageWebView

I would like to get some feedback on my AS3 code below. It's for an Adobe Air mobile app to preload a website in a StageWebView container. That container will be moved on screen later in the app ...
1
vote
1answer
98 views

Unit tests for collisions

I'm finding it a bit tedious to write unit tests for my collision class because there are so many variations of collisions that need testing. I see repetition in the set-up and assertion stages of ...
1
vote
1answer
70 views

Passing lots of options to a function

I am learning actionscript 3 coding by making a crappy platformer game :) The problem I am facing is passing lots of options to a construct function that will setup the display object where all of ...
10
votes
1answer
123 views

Key Press Handler

I have made a class to import into my projects to more easily handle the state of the keyboard so I can use stuff like: if(Keys.returnKey(37)){ As opposed to ...
0
votes
1answer
114 views

Actionscript 3.0, good OOP?

I have been coding for some time (3 years I think), and have recently been wondering if my coding pattern is any good. Any kind of feedback is welcome: EDIT: The thing that concerns me most is that I ...
3
votes
2answers
209 views

Add events dispatching for ActionScript framework Robotlegs

I have the following function in a Service class ...
3
votes
10answers
2k views

How to simplify my else if statement

Alright so this isn't an issue with my program not working, it's more of a fact that I wanna learn to code better. This is one of 6 if else statements that I use inside of my program. What I'm ...
2
votes
2answers
134 views

Is this possibly confusing code?

A previous developer had an array of strings like so: ...
2
votes
2answers
159 views

Is there anything biased in this performance test?

Just wondering if this basic performance test between an untyped array of arrays and a vector (typed array) of arrays in Actionscript 3... is fair and balanced? It's simple, designed to test random ...
4
votes
2answers
197 views

Using Booleans to Manage State

I'm in the middle of writing my own little bullet shooter game much in the style of Touhou. Everything works fine so far but I'm disliking certain aspects of my code. Take this function for showing ...
7
votes
1answer
871 views
5
votes
1answer
321 views

Actionscript web service and web method call classes

I'm trying to isolate a webservice in its own class, and I plan to add separate classes to each webmethod there is in the webservice. What I have so far works, but I have this feeling tickling that ...
3
votes
1answer
287 views

More efficient way to write this Actionscript 3 class?

I wrote one of my first classes in Actionscript 3 and I want someone versed in AS3 to help me fine tune my class. I am sure there are things that could really help with efficiency and I love learning ...
3
votes
1answer
133 views

AS3 AIR class robustness check

I have a ActionScript 3 AIR class that I'd like you to check for robustness. I know it's quite a lot of code and It's not required that you review the full code, but maybe you see general problems in ...
4
votes
1answer
309 views

Getting better speed from adjusting rows in a DockableToolBar

I've been using FlexLib for its dockable toolbar feature. When you shrink the window, it will try to wrap rows if the stage width is less than the row width. Unfortunately, it won't reverse the ...