This site works A LOT better with JavaScript enabled!
This is the beta version of this site! Some things may not be working.

GridSizer Anchors

Run
var game = new tine.Game(null, { create: function() { // Create flexible bitmaps to fill the sizer area var obj01 = new createjs.Text('top_left', '24px Arial', '#EEE'); var obj02 = new createjs.Text('top_middle', '24px Arial', '#EEE'); var obj03 = new createjs.Text('top_right', '24px Arial', '#EEE'); var obj04 = new createjs.Text('middle_left', '24px Arial', '#EEE'); var obj05 = new createjs.Text('center', '24px Arial', '#EEE'); var obj06 = new createjs.Text('middle_right', '24px Arial', '#EEE'); var obj07 = new createjs.Text('bottom_left', '24px Arial', '#EEE'); var obj08 = new createjs.Text('bottom_middle', '24px Arial', '#EEE'); var obj09 = new createjs.Text('bottom_right', '24px Arial', '#EEE'); // Set Up the the sizer var area = new createjs.Rectangle(0, 0, game.canvas.width, game.canvas.height); var grid = new tine.GridSizer(3, 3, area); grid.add(obj01, 0, tine.TOP_LEFT); grid.add(obj02, 0, tine.TOP); grid.add(obj03, 0, tine.TOP_RIGHT); grid.add(obj04, 0, tine.LEFT); grid.add(obj05, 0, tine.CENTER); grid.add(obj06, 0, tine.RIGHT); grid.add(obj07, 0, tine.BOTTOM_LEFT); grid.add(obj08, 0, tine.BOTTOM); grid.add(obj09, 0, tine.BOTTOM_RIGHT); grid.layout(); // Add bitmaps to stage game.stage.addChild(obj01); game.stage.addChild(obj02); game.stage.addChild(obj03); game.stage.addChild(obj04); game.stage.addChild(obj05); game.stage.addChild(obj06); game.stage.addChild(obj07); game.stage.addChild(obj08); game.stage.addChild(obj09); } });