This thread was migrated from an old forum. It may contain information that are no longer valid. For further assistance, please post a new question or open a support ticket from the Customer Support portal.
Hi, i wanna ask about how to continuing an animation base on onClick event of a button.
**Image removed for security reasons**
I have a button that, if clicked it will animate a flex . However, with this setup on my onClick event, the flex just animate at first click, it doesn't animate again on second click and so on.
I need to animate the flex whenever i click the button, not only after first click. Any help or hint will be appreciated. 😀😀
Thank you for your response, i have follow your suggestion. The widget did animate when i click a button, but it didn't animate again on second click, just as what i asking about.
Here is my code :
function animateOnClick()
{
var animate = kony.ui.makeAffineTransform();
animate.rotate3D(360, 0, 1, 0);
frmProduct.flxPageNumber.animate(
kony.ui.createAnimation({
"100": {
"anchorPoint": {
"x": 0.5,
"y": 0.5
},
"stepConfig": {
"timingFunction": kony.anim.EASE
},
"transform": animate
}
}), {
"delay": 0,
"iterationCount": "1",
"fillMode": kony.anim.FILL_MODE_BOTH,
"duration": 1,
"direction": kony.anim.DIRECTION_ALTERNATE
});
}
I did call the animateOnClick() function in code snippet under onClick button event. I guess i need something like callback but i have no idea. 😶
Can you help me what things did i miss on the code ?
In IOS widget cannot be rotated by 360 degrees in one step. You need to have multiple steps to rotate the widget. This limitation is captured in documentation.