|This page has been updated to comply with Release 2.5.x of BOARD18.||Go Back|
board18Market2.js contains the BOARD18 startup functions.
- 1 Function makeTrays()
- 2 Function makeMktTokenList()
- 3 Function trayCanvasApp()
- 4 Function mainCanvasApp()
- 5 Function toknCanvasApp(keepBoxSelect)
- 6 Function canvasApp()
- 7 Function itemLoaded(event)
- 8 Function doLink(linkURL)
- 9 Function loadLinks(newLinks)
- 10 Function loadBox(box)
- 11 Function loadSession(session)
Function makeTrays() initializes all of the tray objects. It calls the TokenSheet constructor for each mtok sheet. It also adds the trayNumb to each new tray object. Finally it initializes BD18.curTrayNumb to 0 and BD18.trayCount to the number of tray objects.
This function initializes the BD18.marketTokens array. It calls the MarketToken constructor for each token in BD18.gm.mktTks array and adds the new object to the BD18.marketTokens array.
Function trayCanvasApp calls the trays.place() method for the current token sheet object. This sets up the tray Canvas.
Function mainCanvasApp calls the stockMarket.place() method. This sets up the main Canvas.
Function toknCanvasApp places all existing tokens on the stock market using the BD18.marketTokens array.
Function CanvasApp initializes all canvases. It then calls trayCanvasApp and mainCanvasApp.
This function is an event handler for the game box images. It calls makeTrays, makeBdTileList, canvasApp and delayCheckForUpdate after all itemLoaded events have occured.
The loadLinks function is called by the
The loadLinks function is called by loadBox and getLinks functions to add game links to the "Useful Links" sub-menu.
The loadBox function is a callback function for the gameBox.php getJSON function. It loads all the game box images.
The loadSession function is a callback function for the gameSession.php getJSON function. It finds and loads the game box file.