PDA

View Full Version : "Making movies vibrate"




isimonsen
May 8, 2011, 04:42 PM
Hi guys :) I'm new to this iphone programming stuff. The reason I came here is because I had a brilliant idea to make a movie, and to make the iphone vibrate at some spesific times during the movie. Like when you play playstation and your controller vibrates when you shoot with a gun.

So my question is; is it possible to make an iphone app where the iphone vibrates at some specific times during the movie? If so how? The movie's duration is just around 2 min.

I have got xcode, and I have succeded to make an iphone app with that just plays a movie, its just the vibration I'm wondering about and how to combine these.

Regards Ivar



nickculbertson
May 8, 2011, 10:44 PM
Cool idea. You could in your Movie IBAction include code to delay your vibration action. The movie won't be triggering the vibration but tweaking your delay time should produce the desired effect.


-(IBAction){
//play movie

[self performSelector:@selector(shake) withObject:nil afterDelay:12.0];

}

-(void) shake{
// vibration code
}


Nick