Hi, I have a question regarding a png, animated image sequence.
I am loading images from 1 - 35 into a layer and I am initializing the layer with the 1st image using - initWithImage
. I have several buttons that want to be able to play different ranges of the image sequence array.
Is there a way to play only the images from 1 - 10?
Is there a way to control the range of images played... 11 - 35 or 4 - 20 or whatever?
Of course I tried creating separate layers with separate array's of images and having the layers on top of each other. The problem their is the initWithImage
. If I play the second layer I can see the initialized image underneath.
Here is my image sequence code:
- (void) loadAnim05 {
cAnim = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"cof_01.png"]];
cAnim.center = CGPointMake(78,211);
NSMutableArray *array = [NSMutableArray array];
for (int i = 1; i <= 35; i++)
[array addObject:[UIImage imageNamed:[NSString stringWithFormat:@"cof_%02d.png",i]]];
cAnim.animationImages = array;
cAnim.animationDuration = 1.0;
cAnim.animationRepeatCount = 1;
[self.view addSubview:cAnim];
[cAnim release];
}
Thank you very much for any help.