开发者

Substituting flash in a iphone app

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:[开发者_Go百科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


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.


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


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


First of all, using UIAnimation with a plist of image names and some parser code is your best bet.

However, a new technology on the horizon may make your original idea possible. A new iPhone native Flash Animation parser called hiramkei is coming soon. You can add SWF file animations directly into Xcode projects.

Here's the link http://flash-on-iphone.com/demo/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜