Salut! The animation feature is now available in UsbongKit (Android), but not yet in UsbongKit (iOS). It would be wonderful if images can animate in the iOS version as well!
Here's the basic syntax that I used in the Android version.
<task-node name="animate_and_text~frame-0-3~@audioName=Page1~Ping-pong is a cooperative sport.">
1) animate_and_text means text is displayed below the animating image, like in imageTextDisplay.
2) frame-0-3 means the name of the image file begins with frame, and is numbered from 0 to 3, i.e. frame0, frame1, frame2, frame3. Of course, the frames can either be .png or .jpg.
After frame3, it loops back to frame0. Code-wise, I was able to implement this using the modulo (% sign), such as:
animate_counter = (animate_counter+1)%endFrame
I then put this in a thread separate from the Main thread.
If the person doesn't want the animation to loop, I'm thinking of adding the doNotLoopAnimation keyword like inserting optional in a component where the person is not required to enter a text, select an answer, etc.
The other variations of animate_text are:
1) text_and_animate, where text (scrollable) is displayed before the animating images, like in textImageDisplay.
2) animate, where only the animating images are shown, like in imageDisplay.
Please do feel free to express your opinion on these things.
Salut! The animation feature is now available in UsbongKit (Android), but not yet in UsbongKit (iOS). It would be wonderful if images can animate in the iOS version as well!
Here's the basic syntax that I used in the Android version.
<task-node name="animate_and_text~frame-0-3~@audioName=Page1~Ping-pong is a cooperative sport.">
1)
animate_and_text
means text is displayed below the animating image, like inimageTextDisplay
.2)
frame-0-3
means the name of the image file begins withframe
, and is numbered from0
to3
, i.e.frame0
,frame1
,frame2
,frame3
. Of course, the frames can either be.png
or.jpg
.After
frame3
, it loops back toframe0
. Code-wise, I was able to implement this using the modulo (% sign), such as:animate_counter = (animate_counter+1)%endFrame
I then put this in a thread separate from the Main thread.
If the person doesn't want the animation to loop, I'm thinking of adding the
doNotLoopAnimation
keyword like insertingoptional
in a component where the person is not required to enter a text, select an answer, etc.The other variations of
animate_text
are: 1)text_and_animate
, where text (scrollable) is displayed before the animating images, like intextImageDisplay
. 2)animate
, where only the animating images are shown, like inimageDisplay
.Please do feel free to express your opinion on these things.
Merci beaucoup toujours!