Skip to main content

SVG (SVG) Widget Control

This page lists the Widget Control (Property · Method · Event) you use to control the SVG widget from a script. To learn what the widget is and how to use it, visit SVG.

info

The svgID in the examples below is the name (ID) you assigned to the SVG widget on the canvas. In a script, access members as widgetID.member.

Widget Control summary

Widget ControlKindSignatureDescription
playMethodsvgID.play()Starts animation playback, or resumes it
pauseMethodsvgID.pause()Pauses the animation at the current frame
stopMethodsvgID.stop()Stops the animation and returns it to the first frame

Property

info

Not applicable — the SVG widget has no script-specific Property. From a script, read and write values with the common Widget Control below (getProperty / setProperty).

Method

play

Starts playing an animated SVG, or resumes playback from a paused state.

  • Kind: Method
  • Parameters: None
  • Returns: None (void)
  • Note: Does nothing on a static SVG whose animated property is turned off, or when the widget hasn't been rendered on screen yet.

Example

svgID.play();

pause

Stops the animation at the current frame. Call play() again and playback resumes from that point.

  • Kind: Method
  • Parameters: None
  • Returns: None (void)

Example

svgID.pause();

stop

Stops the animation and returns it to the first frame.

  • Kind: Method
  • Parameters: None
  • Returns: None (void)

Example

svgID.stop();

Event

info

Not applicable — the SVG widget has no dedicated Event.

Common Widget Control (all widgets)

note

Every widget supports name-based common Widget Control (Method) such as setProperty / getProperty / setStyleProperty. See the common reference doc (to be written).