Skip to main content

LiveCode Motion

Type

library

Summary

LiveCode Motion is a comprehensive animation library for creating fluid, dynamic animations in LiveCode applications.

Description

This library provides powerful tools for creating animations in LiveCode. It supports multiple animation approaches including:

  • Direct property animations with customizable easing
  • Keyframe-based animations for complex sequences
  • Timeline-based animations
  • State transitions
  • Path-based motion

The library works with numeric values, points, colors, and rectangles, making it suitable for animating position, size, color, opacity and other visual properties of any LiveCode control.

Compatibility and Support

OS

mac

windows

linux

ios

android

Platforms

desktop

mobile

web

Children Properties

Function

NameSummarySyntax
animationDefinitionsReturns a list of all defined animations.get animationDefinitions()
createAnimationInstanceCreates an animation instance from a defined animation.createAnimationInstance(<pTargetControl>, <pAnimationName>, [<pOptions>])
easingMethodsList the names of all easing methods.get easingMethods()
getAnimationIDReturns the ID of any active animation for a specific control and property.get getAnimationID(pControl, pPropertyName)

Command

NameSummarySyntax
lockAnimationsTemporarily preventing the animationslockAnimations
startAnimationStarts playing an animation instance.startAnimation <pID>
defineAnimationDefines a reusable keyframe animation sequence.defineAnimation <pName>, <pKeyframes>, <pDuration>, <pEasing>
playAnimationResume an animation or all paused or stopped animationsplayAnimation [<pAnimationID>]
deleteAnimationDeletes a previously defined animation.deleteAnimation <pName>
unlockAnimationsAllowing object motions caused with the animate command to be seen.unlockAnimations
animatePropertyChange the value of a property of an object in an animated wayanimateProperty <pControl>, <pPropertyName>, <pEndValue>, [<pDuration>], [<pEasing> | <pAnimationOptions>]
stopAnimationStop one animation or all animationsstopAnimation [<pAnimationID>]
updateAnimationUpdates an existing animation definition with new parameters.updateAnimation <pName>, <pKeyframes>, <pDuration>, <pEasing>
pauseAnimationPause one animation or all animationspauseAnimation [<pAnimationID>]

Property

NameSummarySyntax
scaleYSets the vertical scaling of an object by adjusting its heightset the scaleY of object to <number>[%]
scaleXSets the horizontal scaling of an object by adjusting its widthset the scaleX of object to <number>[%]
scaleXYSets both horizontal and vertical scaling of an object by adjusting width and height togetherset the scaleXY of object to <number>[%]
translateYSets the vertical translation of an object by moving it along the Y-axisset the translateY of object to <number>[%]
translateXSets the horizontal translation of an object by moving it along the X-axisset the translateX of object to <number>[%]

Message

NameSummarySyntax
exitAnimationFrameThis message is sent to the objects after the value of the animation is updated.exitAnimationFrame <pAnimationID>
enterAnimationFrameThis message is sent to the objects before updating the value of each animation.enterAnimationFrame <pAnimationID>
startingAnimationMessage fired on the object that the animation is applied to.startingAnimation <pAnimationID>
animationDoneMessage generated at the end of an animation.animationDone <pAnimationID>
failedAnimationMessage generated when an animation fails.failedAnimation <pErrorMessage>