Adobe ActionScript 3 is the open source object oriented programming (OOP) language of the Adobe Flash and Air Platforms. AS3 widely used for RIAs, mobile apps, and desktop applications. (ActionScript 3 is a dialect of ECMAScript.)

learn more… | top users | synonyms

15
votes
2answers
207 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 ...
9
votes
1answer
147 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 ...
9
votes
1answer
102 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 ...
7
votes
1answer
43 views

Date Range validation

The following is 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 ...
5
votes
1answer
232 views

Please, review my actionscript web service call class. And web method call class

I' trying to isolate a webservice in its own class, and I plan to add separate classes to each webmethod there is in the webservice. So far, this is what I've got. And it works, I have this feeling ...
4
votes
2answers
83 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 ...
4
votes
1answer
300 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 ...
4
votes
1answer
30 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 ...
4
votes
1answer
474 views
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 ...
3
votes
1answer
236 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
62 views

Splitting My Code Into Classes/Functions

I'm looking for code correctedness, best practices. 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 ...
3
votes
1answer
41 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 ...
2
votes
4answers
474 views

how bad is such a comment [closed]

if I have a variable which name is explicit enough, for example: errorLocation How bad it is to put a comment like ...
2
votes
2answers
133 views

Is this possibly confusing code?

A previous developer had an array of strings like so: ...
2
votes
2answers
146 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 ...
2
votes
2answers
166 views

Add events dispatching for ActionScript framework Robotlegs

I have the following function in a Service class ...
2
votes
1answer
47 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 ...
2
votes
0answers
100 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 ...
1
vote
1answer
33 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 ...
1
vote
1answer
72 views

Can these collision unit tests be improved?

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
62 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 ...
1
vote
0answers
72 views

Actionscript Graph data structure implementation

So, I am not sure if I should have Vertex extend Point, because the equals() and ...
1
vote
0answers
151 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 ...
0
votes
2answers
45 views

PRNG - Algorithm: Performance vs Readability

I have a PRNG-Algorithm: ...
0
votes
1answer
100 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 ...