Mii
The best way to display user's Miis
Last updated
Was this helpful?
Was this helpful?
var mii = new wiiMii();
trace("Amount of Miis on console: " + mii.getMiiNum());
for (var i = 0; i < 100; i++) {
if (!mii.isValidIcon(i)) {
trace("Mii #" + i + " is not a valid Mii.");
} else {
trace("The Mii at index " + i + " has the name of " + mii.getMiiName(i) + ".");
// Append a new image element for all Miis with a yellow background.
var elem = document.createElement('img');
elem.src = "miip://IDX/" + i + ".bmp?width=48&height=48&bgR=255&bgG=205&bgB=0";
document.body.appendChild(elem);
}
}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);
}