pxt-calliope/docs/reference/images/show-frame.md
Sam El-Husseini e3975e65e5 pxt-microbit Accessibility PR (#529)
* Accessibility changes
2017-09-07 13:42:08 -07:00

960 B

Show Frame

The show frame function.

Display an Image on the @boardname@'s LED screen

JavaScript

export function showFrame(img: micro_bit.Image, frame: number)

Parameters

  • index - Number; which frame of the image to display

Difference from plot frame

The show frame function is the same as plot frame, but contains a built-in delay after the LED screen has been updated (whereas plot frame has no built-in delay)

Example

let img = images.createImage(`
# . . . # # . . . #
. # . # . . # # # .
. . # . . . # # # .
. # . # . . # # # .
# . . . # # . . . #
`)
img.showFrame(1)

See also

create image, show animation, image, show image, scroll image