tags:

views:

82

answers:

3

I have some .swf files I want to use in an iphone app for menu changes etc.

I have tried to loop through the images(200) to get the same effect, but it doesnt seem to be to my benefit.

What are the best ways to achieve this?

Edit

I currently use the following code

[A1 setImage:[UIImage imageNamed:@"m1.10001.png"] forState:UIControlStateNormal];
[A1 setImage:[UIImage imageNamed:@"m1.10002.png"] forState:UIControlStateNormal];
[A1 setImage:[UIImage imageNamed:@"m1.10003.png"] forState:UIControlStateNormal];
[A1 setImage:[UIImage imageNamed:@"m1.10004.png"] forState:UIControlStateNormal];
[A1 setImage:[UIImage imageNamed:@"m1.10005.png"] forState:UIControlStateNormal];

I wanted to add something like

[self performSelector:@selector(somecode to set image) withObject:A1 afterDelay:1.0];

This feels completely wrong, especially when I have around 200 images.

I need to types of animations.

Firstly I am trying to have a my menus which are png files covering the screen, which has buttons layered on top of that. I want the background to animate.

Secondly I have UIButtons which I need to change image as well, a series of about 5 images to disply, these 5 images are xported from a small swf file.

The buttons seem more difficult to do, but still I am not sure on achieving either of these.

Thanks

A: 

Why not animate the menu changes programatically? Are the .swf files that complicated that they can't be done in the iphone app?

David Liu
I tried this, using 20 images to test how it displays. It just jumps to the last image.
alJaree
@alJaree: No, I mean use stuff like UIView animations to achieve the same effect. As for jumping to the last image, more than likely you just did it wrong. Without any code, I can't help you there, as there's a million ways for it to be incorrectly coded. Looping through images seems like the wrong way to go about it anyways.
David Liu
+2  A: 

Looping does nothing in an event driven UI such as Cocoa Touch, you just block the main thread.

Try your animation using an NSTimer to call back into your animation step-and-display routine at your desired frame rate.

hotpaw2
A: 

Is there a was to covert the files to iPhone supported video files?

seano1