var nwc24 = new wiiNwc24();
var friendAmount = nwc24.getFriendNum();
trace("Amount of friends on console: " + friendAmount);
for (var i = 0; i < friendAmount; i++) {
// Print information about the Mii for reference.
var cid = nwc24.getFriendInfo(i, "miiImage")
trace("The friend at index " + i + " has a CID of " + cid + ".");
// Append a new image element for all Miis with a yellow background.
var elem = document.createElement('img');
elem.src = "miip://CID/" + cid + ".bmp?width=48&height=48&bgR=255&bgG=205&bgB=0";
document.body.appendChild(elem);