Array of data objects: please explain

I’m playing around with the Asteroids game knock-off in Rosenzweig’s “ActionScript 3.0 Game Programming University” and I’ve run into something that Rosenzweig does not explain well and that I do not understand.

As he creates the single class that runs the asteroids-like game, he comes to the part where he creates the “rocks” and adds them to the stage. The rocks are movieclips in the Library, three different sizes (radiuses), are invoked as “newRock” and, since there are multiple rocks, put in the “rocks” array.

Here’s what I need help with: For the following line of code, Rosenzweig gives the following explanation [dx, dy, and dr are references to translation and rotation]:

“The [FONT=Courier New]rocks [/FONT][FONT=Verdana]array is made up of data objects that include a reference to the rock movie clip, the dx, dy, and dr values, the [FONT=Courier New]rockType[/FONT] (size) and the [FONT=Courier New]rockRadius[/FONT].”[/FONT]

Here’s the code:


rocks.push({rock:newRock, dx:dx, dy:dy, dr:dr,
          rockType:rockType, rockRadius:rockRadius});

I need help understanding what that line of code does. The curly braces and colon-separated arguments are not something I’ve seen before.

Thanks!