Adobe Flex, Adobe AIR, ActionScript 3.0, Papervision3D, Cairngorm, Thermo, BlazeDS
ActionScriptCheatSheet.com - Adobe Flex, Adobe AIR, ActionScript 3.0

ActionScript 3.0 Cheatsheet - Top Level Classes

ActionScript 3.0 Cheatsheet Here is the first pass at the AS3.0 Cheatsheet. I started by creating one sheet for the language to mirror the AS2.0 sheet. I got one together for the main packages and then realized that there needed to be a series of cheets to cover the massive size of the third version of ActionScript… So here is the Top Level Classes Sheet. The next sheets will be:

Top Level - Error Classes

flash. Packages

flash. Classes

mx. Packages

mx. Classes

Interfaces

That’s a lot of sheets, but the language is growing, quite nicely too I’d have to say

Stay tuned for new AS3.0 sheets to be posted.

 

20 comments
Digg It!

How to reverse an array with ActionScript (without the .reverse method)

I was reading a blog the other day and in it the author mentioned the fact that a lot of programmers don’t know how to reverse an array in their language of choice. Not by using a library or language method like we have in ActionScript but the acutal programmatic task of reversing an array.

I have used the handy reverse method in the past but never really thought much about how it acutally worked. Not being a CS major and coming from more of a Multimedia background I thought that this would be something to look into.

Here is the code to do the reverse operation:

function reverse(a) {
// index of leftmost element
var left = 0;
// index of rightmost element
var right = a.length-1;
while (left < right) {
// exchange the left and right elements
var temp = a[left];
a[left] = a[right];
a[right] = temp;
// move the bounds toward the center
left++; right–;
}
}
var example_array = new Array(1,2,3,4,5);
trace(example_array);
reverse(example_array);
trace(example_array);

This is Java code ported to ActionScript the original Java code can be found here:
http://www.leepoint.net/notes-java/data/arrays/34arrayreverse.html

Here is how you use the reverse method in ActionScript if you are looking or wondering: Array.reverse();

4 comments
Digg It!

How to be a Programmer by Robert L Read

How to be a Programmer Book CoverThis is a pretty good eBook available for free. I started reading through some of this and have yet to complete the entire book but from my initial scans through the content I am impressed. This truly is the stuff that you don’t learn in college and I would guess that most people don’t get all this until their third or fourth job in the industry.

So newbie’s look close and careful, don’t be scared! Be prepared!

Some sample topics include:

How to Debug by Splitting the Problem Space
How to Estimate Programming Time
How to Utilize People as Information Sources
How to Document Wisely
How to Work with Poor Code
Take Breaks when Stumped
How to Deal with Difficult People
How to Tradeoff Quality Against Development Time
How to Evaluate Interviewees
How to Know When to Apply Fancy Computer Science
How to Talk to Non-Engineers
How to Handle Boring Tasks
How to Gather Support for a Project
How to Communicate Well

“To be a good programmer is difficult and noble. The hardest part of making real a collective vision of a software project is dealing with one’s coworkers and customers. Writing computer programs is important and takes great intelligence and skill. But it is really child’s play compared to everything else that a good programmer must do to make a software system that succeeds for both the customer and myriad colleagues for whom she is partially responsible. In this essay I attempt to summarize as concisely as possible those things that I wish someone had explained to me when I was twenty-one.”

Check out the online version of the book here:

230 kb PDF file

HTML version

source files as a gzipped tar file

2 comments
Digg It!

Sorting Algorithms - Animated visual animations (applets)

Sorting Algorithms - Screen CaptureAfter watching the CSE 142 course I started looking around the web for sorting algorithms and discovered these animated Java Applets. A number of sorting algorithms are illustrated. Here are a few:

Bubble Sort (by James Gosling and Jason Harrison)
Selection Sort (by Jason Harrison)
Insertion Sort (by Jason Harrison)
Shell Sort (by Jason Harrison)
Heap Sort (by Jason Harrison)
Quick Sort (by James Gosling)
Quick Sort with Bubblesort (by Jim Boritz)
Fast Quick Sort (by Denis Ahrens)
Swap Sort (by Jason Harrison)

Check out the applets here:

http://www.cs.ubc.ca/spider/harrison/Java/

I think it would be really awesome to convert these to ActionScript. Think of applying some transitions or easing to the lines of the animations…

1 comment
Digg It!

« Previous Page