Latest snippets

AS Quiz # 12

Today’s quiz is not multiple choice. Instead, use your choice of the Graphics class or BitmapData to write a function that generates the below image:

Your function need not take any arguments, it need only return a display object containing the above image.

Feel free to post your solution in the comments.

[EDIT] Solutions:

The solutions that have been posted in the comments so far are REALLY nice – they’re all worth checking out… and I think everyone posted their code to wonderfl so you can see the result without needing to open flash….

My two solutions:
The first solution is a variation on an example from the book I wrote with Rich Shupe:
First Solution

The next solution is actually in an old post from this site – it uses setPixel and HSV – RGB conversion:
Second Solution

Thanks to everyone who posted solutions so far – I’m surprised again by how many people participate in this format of quiz.

AS Quiz #11

Today’s quiz jumps around from topic to topic, touching on filters, events, BitmapData and more…

Number of Questions : 6
Difficulty : Medium
Topic : Miscellaneous

[QUIZZIN 11]

AS Quiz #9

There were lots of great submissions to yesterdays quiz. If you haven’t seen them, check them out here…
Click here to see two solutions two solutions to yesterdays quiz…

Today’s quiz is medium level and covers a few different topics…

Number of Questions : 6
Difficulty : Medium
Topic : Graphics Class and more

[QUIZZIN 9]

AS Quiz #8

Today’s quiz is not multiple choice. Instead, your task is to write a function that draws stairs that look like this:

Your function should have the following arguments:

drawStairs(graphics, stairNum);
// you may include additional arguments for size, depth etc.. 

Feel free to post your solution in the comments.

I’ll post my solution for this in the comments tomorrow. There is also another multiple choice quiz in the pipeline for tomorrow…

BONUS: Try to use as few Graphics class method calls as possible.

You can see my solutions here.

AS Quiz #6

Wrote this quiz on the fly today… I think it came out pretty hard. Tomorrow I’ll post an easier quiz.

Number of Questions : 5
Difficulty : Medium/Hard
Topic : Mixed (Math, BitmapData, Design Patterns, Tweening)

[QUIZZIN 7]