Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 02-07-2010, 05:42 PM   #3 (permalink)
imrnm245
Registered Member
 
Join Date: Feb 2010
Posts: 8
Default

Quote:
Originally Posted by ChrisMayer View Post
Assuming your sprite is a UIImageView:

Code:
myImageview.animationImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"frame_1.png"],[UIImage imageNamed:@"frame_2.png"],nil];
myImageview.animationDuration=0.5;myImageview.animationRepeatCount=0;[myImageview startAnimating];
where animationDuration=0.5 is the total duration of the animation in seconds.
i tried that, but i dont know where to declare the myImageview. Also, what would happen if my sprite wasnt a UIImageView? something like:

AtlasSpriteManager *spriteManager = (AtlasSpriteManager*)[self getChildByTag:kSpriteManager];
AtlasSprite *one = (AtlasSprite*)[spriteManager getChildByTag:kOne];
imrnm245 is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,871
Threads: 89,225
Posts: 380,695
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Darmanikles
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:49 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.