Created
April 9, 2013 21:02
-
-
Save C4Code/5349368 to your computer and use it in GitHub Desktop.
Movie, animated, distorted.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// C4WorkSpace.m | |
// Notification Tutorial | |
// | |
// Created by Travis Kirton. | |
// | |
#import "C4WorkSpace.h" | |
@implementation C4WorkSpace { | |
C4Shape *text; | |
C4Movie *movie; | |
} | |
-(void)setup { | |
text = [C4Shape shapeFromString:@"MOVIE" withFont:[C4Font fontWithName:@"Avenir-Black" size:200]]; | |
movie = [C4Movie movieNamed:@"inception.mov"]; | |
text.center = movie.center; | |
movie.mask = text; | |
movie.anchorPoint = CGPointMake(0.5, 1.5f); | |
movie.center = self.canvas.center; | |
movie.perspectiveDistance = 1000.0f; | |
movie.loops = YES; | |
[self.canvas addMovie:movie]; | |
[self runMethod:@"animate" afterDelay:0.25f]; | |
} | |
-(void)animate { | |
[movie play]; | |
movie.animationDuration = 8.0f; | |
movie.animationOptions = LINEAR | REPEAT; | |
movie.rotationX = TWO_PI; | |
} | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment