Created
March 21, 2015 05:07
-
-
Save shouse/de58179e3a70e15cc02e to your computer and use it in GitHub Desktop.
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
/** | |
* Movies | |
* | |
* @copyright | |
* Copyright (c) 2015 by Appcelerator, Inc. All Rights Reserved. | |
* | |
* @license | |
* Licensed under the terms of the Apache Public License | |
* Please see the LICENSE included with this distribution for details. | |
*/ | |
exports.flash = function(view, callback) { | |
var in_animation = Ti.UI.createAnimation({ | |
opacity: 0.7, | |
curve: Ti.UI.ANIMATION_CURVE_EASE_IN, | |
duration: 100 | |
}); | |
in_animation.addEventListener('complete', function(e){ | |
var out_animation = Ti.UI.createAnimation({ | |
opacity: 0, | |
curve: Ti.UI.ANIMATION_CURVE_EASE_OUT, | |
duration: 300 | |
}); | |
out_animation.addEventListener('complete', function(e){ | |
callback(); | |
}); | |
view.animate(out_animation); | |
}); | |
view.animate(in_animation); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment