-
-
Notifications
You must be signed in to change notification settings - Fork 19
Lottie
Michael edited this page Mar 16, 2017
·
10 revisions
(Android only at the moment)
Name | Parameter | Info |
---|---|---|
start() | Starts an animation from the beginning | |
pause() | Pause an animation | |
resume() | Resumes an animation from the current point | |
stop() | Stops an animation an resets it | |
addEventListener(String event, Callback function) | Event name as string Callback function |
Adds events to the animation view |
setFile(String path) | File path as string | Sets the current animation, Files go into app/assets/ (Alloy) |
Name | Parameter | Info |
---|---|---|
progress | float | Get/set the current progress (in percentage) |
loop | boolean | Get/set if the animation should loop |
speed | float | Get/set the speed of the animation |
duration | float | Get/set the duration of the animation |
isPlaying | boolean | Get the animation status |
creation (tss) only:
Name | Parameter | Info |
---|---|---|
assetFolder | String | If your animation contains images put the folder inside the assetFolder (e.g. images/ and put the image files inside app/assets/images/ ) |
file | String | JSON file. Files go into app/assets/ (Alloy) |
loop | boolean | loop the animation |
autoStart | boolean | automatically start the animation |
Name | Info |
---|---|
complete | When the animation is done |
update | Fires during the animation |
<LottieView id="view_lottie" module="ti.animation" />
"#view_lottie" : {
file: "data.json",
assetFolder: "images/",
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
borderColor: "#000",
borderWidth: 1
}