Difference between revisions of "MovieClip.getTweenFunction"

From GiderosMobile
 
Line 10: Line 10:
  
 
=== Parameters ===
 
=== Parameters ===
'''name''': (string) The name of the requested tween function<br/>
+
'''name''': (string) the name of the requested tween function<br/>
  
 
=== Return values ===
 
=== Return values ===
 
'''Returns''' (function) the specified tween function, or linear tween function if name wasn't recognized<br/>
 
'''Returns''' (function) the specified tween function, or linear tween function if name wasn't recognized<br/>
 +
 +
=== Example ===
 +
<syntaxhighlight lang="lua">
 +
print(MovieClip.getTweenFunction("linear")) --> function: 0x0000029ff8243530
 +
print(MovieClip.getTweenFunction("inBounce")) --> function: 0x0000029ff82434e0
 +
print(MovieClip.getTweenFunction("outBounce")) --> function: 0x0000029ff8243490
 +
</syntaxhighlight>
  
 
{{MovieClip}}
 
{{MovieClip}}

Latest revision as of 20:52, 30 September 2023

Available since: Gideros 2023.9
Class: MovieClip

Description

Retrieves a native tween/easing function by its name.

(function) = MovieClip.getTweenFunction(name)

Parameters

name: (string) the name of the requested tween function

Return values

Returns (function) the specified tween function, or linear tween function if name wasn't recognized

Example

print(MovieClip.getTweenFunction("linear")) --> function: 0x0000029ff8243530
print(MovieClip.getTweenFunction("inBounce")) --> function: 0x0000029ff82434e0
print(MovieClip.getTweenFunction("outBounce")) --> function: 0x0000029ff8243490