tween functions
api復制 Tween Functions startTween(tag:String, vars:String, values:Any = null, duration:Float, options:Any = null) Starts a tween in any value(s) to an object or note. tag - The tag name for the tween function to referenced; Will be called to the onTimerCompleted() function after finishing. vars - The object or note name for the tween function to referenced. values - The target value(s) for the tween function to end; Example: {angle = 360, alpha = 0}. duration - The duration length for the tween function to end. options - Other option properties for the tween to use; Example: {ease = 'linear', type = 'PINGPONG'}. Options Sub-Parameters: Objects doTweenX(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) Does a tween in the x position value to the object. tag - The tag name for the tween function to referenced; Will be called to the onTimerCompleted() function after finishing. vars - The object or note name for the tween function to referenced. value - The target x position value for the tween function to referenced. duration - The duration length for the tween function to end ease - The specific ease type to play; Examples: linear, sineIn, bounceOut, etc. doTweenY(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) Does a tween in the y position value to the object. doTweenAngle(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) Does a tween in the angle value to the object. doTweenAlpha(tag:String, vars:String, value:Dynamic, duration:Float, ease:String) Does a tween in the alpha/opacity value to the object. doTweenColor(tag:String, vars:String, targetColor:String, duration:Float, ease:String) Does a tween in the hex color value to the object. targetColor - The target hex color value for the tween function to end. Strum/Receptors noteTweenX(tag:String, note:Int, value:Dynamic, duration:Float, ease:String) Does a note tween in the x position value. tag - The tag name for the tween function to referenced; Will be called to the onTimerCompleted() function after finishing. note - The member ID of the note for the tween function to use, Opponent: 0,1,2,3 and Boyfriend: 4,5,6,7. value - The target x position value for the tween function to referenced. duration - The duration length for the tween function to end ease - The specific ease type to play; Examples: linear, sineIn, bounceOut, etc. noteTweenY(tag:String, note:Int, value:Dynamic, duration:Float, ease:String) Does a note tween in the y position value. noteTweenAngle(tag:String, note:Int, value:Dynamic, duration:Float, ease:String) Does a note tween in the angle value. noteTweenAlpha(tag:String, note:Int, value:Dynamic, duration:Float, ease:String) Does a note tween in the alpha/opacity value. noteTweenDirection(tag:String, note:Int, value:Dynamic, duration:Float, ease:String) Does a note tween in the receptors direction value. Other Tween & Timer Functions runTimer(tag:String, time:Float = 1, loops:Int = 1) Runs a timer, if finish the tag from the tag parameter will be called to the onTimerCompleted() function. tag - The timer tag name from the onTimerCompleted() function to be referenced. time - The duration length of the timer to end; Default value: 1. loops - How many loops will the timer execute; Default value: 1. cancelTimer(tag) Cancels the timer that is currently running. tag - The timer tag name to be used. cancelTween(tag) Cancels the tween that is running. tag - The tween tag name to be currently used.