Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C4Movie interaction issue? #10

Closed
traviskirton opened this issue Mar 29, 2012 · 1 comment
Closed

C4Movie interaction issue? #10

traviskirton opened this issue Mar 29, 2012 · 1 comment

Comments

@traviskirton
Copy link
Collaborator

I had to pause the movie before playing again after changing the rate... should this be the way it works????
Maybe setting rate should pause, then play?

@traviskirton
Copy link
Collaborator Author

Added conditions for pausing / playing before changing the rate if the movie is currently playing.
Updated the condition for determining if the movie is actually playing.

#import "C4WorkSpace.h"

@implementation C4WorkSpace {
    C4Movie *m;
}

-(void)setup {
    m = [C4Movie movieNamed:@"inception.mov"];
    m.shouldAutoplay = YES;
    m.loops = YES;
    [self.canvas addMovie:m];
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    CGPoint currentTouchPoint = [[touches anyObject] locationInView:self.canvas];
    m.rate = (currentTouchPoint.x-384)/384;
}

@end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant