how can you do this with a mutable array so that it will display the images randomly?
how can you code this if you want to compare if a user clicked on the right image (GAME)?
acesamieh 2 months ago
can you teach me
abesha121 5 months ago
is not semicolon is coma!!!!!!!!!!!!!!!!!!!
Chibaboy79 11 months ago
@Chibaboy79 he fixed it -.-
threeamigos321213 4 months ago
Not works with simulator Iphone 4 apears "Expected ']' before';' token and
Missing sentinel in function call
@Chibaboy79 here's what it should be player.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"run1.png"], [UIImage imageNamed:@"run2.png"], [UIImage imageNamed:@"run3.png"], [UIImage imageNamed:@"run4.png"], [UIImage imageNamed:@"run5.png"], [UIImage imageNamed:@"run6.png"],nil]; player.animationDuration = 1; player.animationRepeatCount = 0; [player startAnimating];
gregslife7 9 months ago
All that crap to animate 3 pictures -;l
colombiak 1 year ago
It works perfect! You are awesome. Keep it up!
bowlofnoodl3 1 year ago
Hm, didnt work for me with 4.0? Any change you can post the code itself?
ploglet 1 year ago
@ploglet
I am on 4.o as well and it works only in the simulator. Loaded on iPhone it is blank in the view.
ronbowalker 1 year ago
@ronbowalker Photo file type must be PNG.
Delizsieg 1 year ago
Nice tutorial. I was wondering if you were gonna catch those ; You saved them until the end for dramatic effect. One quick correction: Duration != Duratation :P
RowanLives 1 year ago
i have 5 Errors & 3 Warnings! I dont´t know why?!
I do the same what you do!?
Please help!
AriaPictures 2 years ago
man u d best.
Felipecabesas 2 years ago
I've got a 2 view app, so is there a way to make it play at a button? cus otherwise im kinda screwed
richifie 2 years ago
@richifie not sure if you want to play it inside the button or start playing when the button is pressed...
if you want to play after a button was pressed, just put the start animating in the function your button click will call.
if you want to play inside the button, change the [self.view addSubview.....
to [button_name.view addSubview ....
or something along these lines....i havent tryed this, but it should work, since everything thats visible is a view, so you can add a subview to it ;)
montinhoman 1 year ago
how can you do this with a mutable array so that it will display the images randomly?
how can you code this if you want to compare if a user clicked on the right image (GAME)?
acesamieh 2 months ago
can you teach me
abesha121 5 months ago
is not semicolon is coma!!!!!!!!!!!!!!!!!!!
Chibaboy79 11 months ago
@Chibaboy79 he fixed it -.-
threeamigos321213 4 months ago
Not works with simulator Iphone 4 apears "Expected ']' before';' token and
Missing sentinel in function call
Chibaboy79 11 months ago
@Chibaboy79 here's what it should be player.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@"run1.png"], [UIImage imageNamed:@"run2.png"], [UIImage imageNamed:@"run3.png"], [UIImage imageNamed:@"run4.png"], [UIImage imageNamed:@"run5.png"], [UIImage imageNamed:@"run6.png"],nil]; player.animationDuration = 1; player.animationRepeatCount = 0; [player startAnimating];
gregslife7 9 months ago
All that crap to animate 3 pictures -;l
colombiak 1 year ago
It works perfect! You are awesome. Keep it up!
bowlofnoodl3 1 year ago
Hm, didnt work for me with 4.0? Any change you can post the code itself?
ploglet 1 year ago
@ploglet
I am on 4.o as well and it works only in the simulator. Loaded on iPhone it is blank in the view.
ronbowalker 1 year ago
@ronbowalker Photo file type must be PNG.
Delizsieg 1 year ago
Nice tutorial. I was wondering if you were gonna catch those ; You saved them until the end for dramatic effect. One quick correction: Duration != Duratation :P
RowanLives 1 year ago
i have 5 Errors & 3 Warnings! I dont´t know why?!
I do the same what you do!?
Please help!
AriaPictures 2 years ago
man u d best.
Felipecabesas 2 years ago
I've got a 2 view app, so is there a way to make it play at a button? cus otherwise im kinda screwed
richifie 2 years ago
@richifie not sure if you want to play it inside the button or start playing when the button is pressed...
if you want to play after a button was pressed, just put the start animating in the function your button click will call.
if you want to play inside the button, change the [self.view addSubview.....
to [button_name.view addSubview ....
or something along these lines....i havent tryed this, but it should work, since everything thats visible is a view, so you can add a subview to it ;)
montinhoman 1 year ago