I have 2 different animations and i am trying to trigger both animations at the same time by using one button. I can get the images to show but it either shows one animation or the other only.
Code m. (How can i add to this code to display 2 "different" animations by one button? Do i need to create another IBAction and link it to the same button?)
Code:
-(IBAction) myAction
{
if(myInt == 0) { [self mySound1]; }
{ //START OF ANIMATION
animation.animationImages = [NSArray arrayWithObjects:
[UIImage imageNamed:@"cloud1.png"],
[UIImage imageNamed:@"cloud2.png"],
[UIImage imageNamed:@"cloud3.png"],
[UIImage imageNamed:@"cloud4.png"],
[UIImage imageNamed:@"cloud5.png"],
[UIImage imageNamed:@"cloud6.png"],
[UIImage imageNamed:@"cloud7.png"],
nil];
[animation setAnimationRepeatCount:1];
animation.animationDuration = 1;
[animation startAnimating];
} // END OF ANIMATION
}