springroll.easeljs.BasePanel Class

Panel with convenience properties to the config, background and app.

Constructor

springroll.easeljs.BasePanel

()

cacheByBounds

(
  • [buffer=0]
  • [scale=1]
)
Does a cache by the nominalBounds set from Flash

Parameters:

  • [buffer=0] Int optional
    The space around the nominal bounds to include in cache image
  • [scale=1] Number optional
    The scale to cache the container by.

cacheByRect

(
  • rect
  • [buffer=0]
  • [scale=1]
)
Does a cache by a given rectangle

Parameters:

  • rect createjs.Rectangle
    The rectangle to cache with.
  • [buffer=0] Int optional
    Additional space around the rectangle to include in cache image
  • [scale=1] Number optional
    The scale to cache the container by.

cleanupChildren

(
  • children
)

Defined in cleanupChildren:72

Removes a collection of objects from the stage and destroys them if we cant.

Parameters:

  • children Array |

    Assets to clean can either be individual children or collections of children

Example:

this.removeChildren(this.skipButton, this.character);

destroy

()

Defined in destroy:117

Destroy and don't use after this

setup

()

Defined in setup:51

Should be called whenever a state enters this panel, Implementation-specific

teardown

()

Defined in teardown:60

Should be called whenever a state exits this panel, the default behavior is to remove all children of the panel. It will stop any movieclip, destroy any objects, remove DwellTimers, etc.

app

Application

Defined in app:29

Reference to the app

background

createjs.Bitmap

Defined in background:41

All panel should probably have a background image

config

Object

Defined in config:35

Reference to the app's config

game

springroll.Application deprecated

Defined in game:15

Deprecated: since version 0.3.0

See springroll.BasePanel/app:property