Hi I'm trying to create an animation, that animates one time when the animation is clicked. Before the animation is clicked, the first image of the animation should be displayed.
However the images never shows up, as I would have expected after running show in the 'load' event handler, as you can see in the code snippet below.
If I change the repeatCount to 0, and run start() instead of show() in the load event hanlder the animation shows up and animates forever. But I want it to animate only once when I click on it.
Any ideas whats wrong anyone?
var animimages=[]; animimages.push('hus.png'); animimages.push('hus2.png'); animimages.push('hus3.png');
var animationView = Titanium.UI.createImageView({
images:animimages,
duration:100,
repeatCount:1
});
win1.add(animationView);
animationView.addEventListener('load', function(e){ animationView.show(); });
animationView.addEventListener('singletap', function(e){ animationView.start(); } });
Your Answer
Think you can help? Login to answer this question!