Button#setFrames()

setFrames(overFrame, outFrame, downFrame, upFrame)

Used to manually set the frames that will be used for the different states of the Button.

Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.

Parameters
Name Type Argument Description
overFrame string | integer <optional>

The frame / frameName when the button is in the Over state.

outFrame string | integer <optional>

The frame / frameName when the button is in the Out state.

downFrame string | integer <optional>

The frame / frameName when the button is in the Down state.

upFrame string | integer <optional>

The frame / frameName when the button is in the Up state.

Source code: gameobjects/Button.js (Line 320)
doc_phaser
2017-02-14 10:39:37
Comments
Leave a Comment

Please login to continue.