AS Quiz #15 (Hardest Quiz Yet)

This is probably the hardest quiz yet. After yesterdays very easy quiz I figured I’d do something really trickey… binary is always a good way to make a quiz hard… so most of the questions are about binary operators and ByteArray… there is also one question about Bezier math.

Number of Questions : 7
Difficulty : Hard
Topic : Binary and Bezier

Which random sequence would you associate the below snippet with?

for (var i:int = 0; i<4; i++){
  trace(int(Math.random()*2) - 1 | 1);
}






Which of the below sequences would you associate with the following snippet?

for (var i:int = 0; i<10; i++){
  trace(i & 2);
}
You may want to work this out on paper






A quadratic Bézier curve is the path traced by the function B(t), given points P0, P1 and P2.

The above is from wikipedia.

Which of the below lines of actionscript accurately represents the B(t) function? Hint: Try working it out yourself and then choosing the answer that is closest to your own. You can use this template over at wonderfl to help you work it out:





What is the length of the following ByteArray?

var bytes:ByteArray = new ByteArray();
bytes.writeInt(0xFFFFFF);





What is the length of the following ByteArray?

var bytes:ByteArray = new ByteArray();
bytes.writeInt(0xFFFFFF);
bytes.writeUnsignedInt(0xFFFFFF);







How many bytes does it take to represent a short in a ByteArray?





What will the following snippet trace to the output window?

var bytes:ByteArray = new ByteArray();
bytes[0] = 0;
bytes[1] = 0;
bytes[2] = 1;
bytes[3] = 1;

bytes.position = 0

trace(bytes.readInt());







Posted in Quiz | Tagged , , , | 3 Comments

AS Quiz #14

Today’s quiz is about TextFields.

Number of Questions : 6
Difficulty : Easy
Topic : TextFields

Please go to AS Quiz #14 to view the quiz

Posted in Quiz | Tagged , , , | 1 Comment

AS Quiz #13

Today’s quiz is not multiple choice. Instead, your task is to draw a spiral using a recursive function.

Optionally you can alter your function to draw other types of spiral forms:

(You can view various solutions in the comments - as well as my solution at wonderfl)

Posted in Quiz | Tagged , , , | 6 Comments

QuickBox2D Tutorial

Today the first part of a 3 part QuickBox2D tutorial went live on active.tutsplus.com

It’s an intro tutorial, so it just scratches the surface. Part 2 digs a bit deeper and part 3 covers complex stuff like joints and contacts…. (part 2 and 3 will be posted sometime in the near future).

Check it out here…

Posted in Uncategorized | Tagged | 13 Comments