Skip to main content

Lottie Element API

Lottie element has all common element properties + some specific properties.

Methods​

setTextContent(layerName, content)​

  • layerName string - name of the text layer in the Lottie animation
  • content string

This method sets the content of the Lottie text layer with the given name. Text layers inside precompositions are found too.

Action example
lottieElement.setTextContent("_name", "John Doe");

setImageSource(layerName, url)​

  • layerName string - name of the image layer in the Lottie animation
  • url string

This method sets the source of the Lottie image layer with the given name.

Action example
lottieElement.setImageSource("_image", "file:///C:/logos-repository/logo.png");