applyImage
API - applies an image or animation to a GameObject.
return function()
wait(2);
local app = getApp();
local ob = app.createGameObject(); --create object to attach images to
applyImage(ob, 'welcomeImage'); --add the image titled 'welcome' to the object
ob.image.anchor('bottom left', true); --anchors the image to the bottom left... accounting for image dimensions = true
waitForAnimation(ob.image); --pauses script until finished...
wait(2);
applyImage(ob, 'byeImage');
waitForAnimation(ob.image);
log('finished playing two animations!');
endLast updated