• Getting Started
  • Guides
  • API Reference
  • Tutorials
  • Plugins
  • Solar2D Native
  • CoronaCards
  • transition.blink()
    • Overview
    • Syntax
      • target (required)
      • params (required)
    • Parameter Reference
      • time (optional)
      • tag (optional)
      • delay (optional)
      • onStart (optional)
      • onPause (optional)
      • onResume (optional)
      • onCancel (optional)
      • onRepeat (optional)
    • Examples
Documentation  ▸  API Reference  ▸  Libraries  ▸  transition  ▸  blink

transition.blink()

Type Function
Library transition.*
Return value Object
Revision Release 2025.3714
Keywords easing, animation, transition, tween, interpolation

Overview

Blinks (glows) an object in and out over a specified time, repeating indefinitely.

Syntax

transition.blink( target, params )
target (required)

Table. Any object that behaves like a table, for example display objects.

params (required)

Table. A table that specifies the properties of the transition — see the next section for details.

Parameter Reference

time (optional)

Number. The time of the action.

tag (optional)

String. Specifies the transition tag. The transition library can pause, resume, or cancel transitions sharing the same tag.

delay (optional)

Number. Specifies the delay, in milliseconds, before the transition begins. Default is 0.

onStart (optional)

Listener. Listener function to be called before the transition begins. This function will receive a reference to the associated object as its sole argument.

onPause (optional)

Listener. Listener function to be called when the transition is paused. This function will receive a reference to the associated object as its sole argument.

onResume (optional)

Listener. Listener function to be called when the transition is resumed. This function will receive a reference to the associated object as its sole argument.

onCancel (optional)

Listener. Listener function to be called when the transition is cancelled. This function will receive a reference to the associated object as its sole argument.

onRepeat (optional)

Listener. Listener function to be called when the transition completes an iteration in a repeat cycle. This function will receive a reference to the associated object as its sole argument.

Examples

local square = display.newRect( 0, 0, 100, 100 )

transition.blink( square, { time=1000 } )

© 2020-2025 Solar2D All Rights Reserved.

Help us help you! If you notice a problem with this page, please report it.

Report an Issue