ࡱ> Root Entryp|YrRASHwG@ContentsPage 1 jSymbol 1 '(),Root Entryp|YrRASH`?貅@ContentsPage 1 jSymbol 1  !"#$%&*+Symbol 2Symbol 2  !"#$%&'()*+,-./0123456789:;<=>?@ABCDCPicPage CPicLayer CPicFrameCPicTextz>textArial(text will go hereD\Daa0P0?Layer 1OLayer 1CPicPage CPicLayer CPicFrame?Layer 1Oon shuffle (theArray) { for (vCPicPage CPicLayer CPicFrameCPicText{$kX@DArialf" grid.attachMovie("tile", "tile0", 0);grid.tile0.text = tileList[0];f$W0@Arial̙"  !"#$%&'()*+,-./0123456789:;<=>?@ABCD?Layer 1Oon shuffle (theArray) { for (vCPicPage CPicLayer CPicFrameCPicText{$kX@DArialf" grid.attachMovie("tile", "tile0", 0);grid.tile0.text = tileList[0];f$W0@Arial̙"dynamic tile gridfU00>0`8 j8 (?bgOO 8 @ Arial̙"(the grid on the left is created by the function generateGrid(), which creates and arranges a series of tiles in rows and columns based on an array of strings and a specified number of columns. the grid's position and tile spacing may also be set as function parameters.? description?m // Supply the text to go on each tile of the grid var tiles = ["one", "two", "three", "four", "five", "six", "seven"]; // Create the grid. generateGrid(tiles, 30, 150, 2, 10, 10); /* ******************************* *** FUNCTION generateGrid() *** ******************************* > VERSION: 1.0.0 > DESCRIPTION: Creates a series of tile clips and arranges them in rows and columns. > PARAMETERS: tileList An array. Elements contain the text to go on each tile. gridX The left edge of the grid. gridY The top edge of the grid. numColumns The number of columns in each row. hGap The amount of horizontal space between tiles. vGap The amount of vertical space between tiles. */ function generateGrid (tileList, gridX, gridY, numColumns, hGap, vGap) { // Attach a clip to hold all the tiles...name it "grid". _root.attachMovie("emptyclip", "grid", 1000); // Place the grid clip grid._x = gridX; grid._y = gridY; // Attach the first tile to the grid manually // so we can retrieve its height and width. grid.attachMovie("tile", "tile0", 0); grid.tile0.text = tileList[0]; var tileHeight = grid.tile0._height; var tileWidth = grid.tile0._width; // Set the horizontal location of the next tile. var columnXOffset = tileWidth + hGap; // Now attach the remaining tiles to the grid clip. for (var i = 1; i < tileList.length; i++) { // Attach a tile. grid.attachMovie("tile", "tile" + i, i); // Store a convenient reference to the tile clip object var thisTile = grid["tile" + i]; // Set the text output on the tile. thisTile.text = tileList[i]; // Check which row this tile is on. var currentRow = Math.floor(i/numColumns); // Check which row the previous tile was on. var previousRow = Math.floor((i-1)/numColumns); // Set the vertical position of the tile. thisTile._y = currentRow * (tileHeight + vGap); // If we've just moved onto a new row, set the // horizontal offset back to 0. if (currentRow != previousRow) { columnXOffset = 0; } // Set the horizontal position of the current tile. thisTile._x = columnXOffset; // Increase the horizontal offset for the next tile in this row. columnXOffset += (tileWidth + hGap); } }scriptsOO X@DArialf" grid.attachMovie("tile", "tile0", 0);grid.tile0.text = tileList[0];f$W0@Arial̙"  CDocumentPage Page 1Scene 1:9: Symbol 2 emptyclip0:N emptyclip0: Symbol 1tile:Utile:*@hhhhh Vector::Template"PublishFormatProperties::generator CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ffdynamic tile gridfU00>0`8 j8 (?bgOO 8 @ Arial̙"(the grid on the left is created by the function generateGrid(), which creates and arranges a series of tiles in rows and columns based on an array of strings and a specified number of columns. the grid's position and tile spacing may also be set as function parameters.? description?m // Supply the text to go on each tile of the grid var tiles = ["one", "two", "three", "four", "five", "six", "seven"]; // Create the grid. generateGrid(tiles, 30, 150, 2, 10, 10); /* ******************************* *** FUNCTION generateGrid() *** ******************************* > VERSION: 1.0.0 > DESCRIPTION: Creates a series of tile clips and arranges them in rows and columns. > PARAMETERS: tileList An array. Elements contain the text to go on each tile. gridX The left edge of the grid. gridY The top edge of the grid. numColumns The number of columns in each row. hGap The amount of horizontal space between tiles. vGap The amount of vertical space between tiles. */ function generateGrid (tileList, gridX, gridY, numColumns, hGap, vGap) { // Attach a clip to hold all the tiles...name it "grid". _root.attachMovie("emptyclip", "grid", 1000); // Place the grid clip grid._x = gridX; grid._y = gridY; // Attach the first tile to the grid manually // so we can retrieve its height and width. grid.attachMovie("tile", "tile0", 0); grid.tile0.text = tileList[0]; var tileHeight = grid.tile0._height; var tileWidth = grid.tile0._width; // Set the horizontal location of the next tile. var columnXOffset = tileWidth + hGap; // Now attach the remaining tiles to the grid clip. for (var i = 1; i < tileList.length; i++) { // Attach a tile. grid.attachMovie("tile", "tile" + i, i); // Store a convenient reference to the tile clip object var thisTile = grid["tile" + i]; // Set the text output on the tile. thisTile.text = tileList[i]; // Check which row this tile is on. var currentRow = Math.floor(i/numColumns); // Check which row the previous tile was on. var previousRow = Math.floor((i-1)/numColumns); // Set the vertical position of the tile. thisTile._y = currentRow * (tileHeight + vGap); // If we've just moved onto a new row, set the // horizontal offset back to 0. if (currentRow != previousRow) { columnXOffset = 0; } // Set the horizontal position of the current tile. thisTile._x = columnXOffset; // Increase the horizontal offset for the next tile in this row. columnXOffset += (tileWidth + hGap); } }scriptsOO X@DArialf" grid.attachMovie("tile", "tile0", 0);grid.tile0.text = tileList[0];f$W0@Arial̙"  CDocumentPage Page 1Scene 1:9: Symbol 2 emptyclip0:N emptyclip0: Symbol 1tile:Utile:*@hhhhh Vector::Template"PublishFormatProperties::generator CColorDef3PfP0PHP`Px333(3f<03CH3F`3Hxf0f30ff(0f5Hf<`f@x3330333xf3d03]H3Z`3Xx3333303f3PPH33Px`33Px33Pf30f33PHff3(PHf3<x`f3Cxf3Ffff`f03f0ffx0fkHfd`f`x3f033fPH3ffxPH3fdx`3f]x3fZff0f3fPHfff`ffP0xffPxffPH3HfHxH̙n`hx3H33x`3fx`3xx`3̙kx3dfHf3x`ff0xfx0xf̙dxf]`3`f``x`px3`33x3fx3x3xx3nf`f3xffxfxfxxfkx3xfxxxxx3x333f333xfxf3fffffxxH3 HfH(H2`8x`3 `f`̙`(`0xx3xfxx x(xPx3H33x`f3x`3(x`35x3<3`33xf3 x̙3x3(x323x33f3 333(xfH3fx`ff0xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx30xf(0xf<xfCf`3fxffx̙fxf(xf5fx3ffff ff((xH3x`f0x̙PPP`3xfx̙P̙(P<x3f̙(xx`3xfxPxPd`3xfx̙PPx3f(xx3fxx3f̙xx3fCYCP"Jf`zff̙xx3fCYCP"Jf`zf*]P|h*]P|h