|
| 1 | +#include "ofApp.h" |
| 2 | + |
| 3 | +//-------------------------------------------------------------- |
| 4 | +void ofApp::setup(){ |
| 5 | + player_.load("hands.m4v"); |
| 6 | + player_.play(); |
| 7 | +} |
| 8 | + |
| 9 | +//-------------------------------------------------------------- |
| 10 | +void ofApp::update(){ |
| 11 | + player_.update(); |
| 12 | + |
| 13 | + if (ofGetElapsedTimef() > 10) { |
| 14 | + player_.close(); |
| 15 | + } |
| 16 | +} |
| 17 | + |
| 18 | +//-------------------------------------------------------------- |
| 19 | +void ofApp::draw(){ |
| 20 | + ofBackground(0,0,0); |
| 21 | + if (player_.isLoaded()) { |
| 22 | + player_.draw(0,0); |
| 23 | + |
| 24 | + } else { |
| 25 | + ofDrawBitmapString("Player was unloaded sucessfully after 10 seconds", 20,20); |
| 26 | + } |
| 27 | +} |
| 28 | + |
| 29 | +//-------------------------------------------------------------- |
| 30 | +void ofApp::exit(){ |
| 31 | + |
| 32 | +} |
| 33 | + |
| 34 | +//-------------------------------------------------------------- |
| 35 | +void ofApp::touchDown(ofTouchEventArgs & touch){ |
| 36 | + |
| 37 | +} |
| 38 | + |
| 39 | +//-------------------------------------------------------------- |
| 40 | +void ofApp::touchMoved(ofTouchEventArgs & touch){ |
| 41 | + |
| 42 | +} |
| 43 | + |
| 44 | +//-------------------------------------------------------------- |
| 45 | +void ofApp::touchUp(ofTouchEventArgs & touch){ |
| 46 | + |
| 47 | +} |
| 48 | + |
| 49 | +//-------------------------------------------------------------- |
| 50 | +void ofApp::touchDoubleTap(ofTouchEventArgs & touch){ |
| 51 | + |
| 52 | +} |
| 53 | + |
| 54 | +//-------------------------------------------------------------- |
| 55 | +void ofApp::touchCancelled(ofTouchEventArgs & touch){ |
| 56 | + |
| 57 | +} |
| 58 | + |
| 59 | +//-------------------------------------------------------------- |
| 60 | +void ofApp::lostFocus(){ |
| 61 | + |
| 62 | +} |
| 63 | + |
| 64 | +//-------------------------------------------------------------- |
| 65 | +void ofApp::gotFocus(){ |
| 66 | + |
| 67 | +} |
| 68 | + |
| 69 | +//-------------------------------------------------------------- |
| 70 | +void ofApp::gotMemoryWarning(){ |
| 71 | + |
| 72 | +} |
| 73 | + |
| 74 | +//-------------------------------------------------------------- |
| 75 | +void ofApp::deviceOrientationChanged(int newOrientation){ |
| 76 | + |
| 77 | +} |
| 78 | + |
| 79 | + |
0 commit comments