The type parameter depicts
whether the animation will play once, continuously loop, or continuously ping pong from the first frame
to the last and back again. Each one is represented by the at_once, at_loop, and at_pingpong
enumerators, respectively.
When your animation is running, you may need to change the animated sequence entirely. You can do
this by setting the group parameter to the group id of the sequence you wish to render. You may also
want to change the type parameter at this time.
At any time during an animation, or indeed when the sprite is static, you can opt to query or set the
current frame of the animation by modifying the currentframe property. Likewise, you can also alter
the location the Sprite is drawn to the destination Surface , by modifying the x and y properties.
Interaction Through Events
Okay, so you ??™ ve seen how you can render to the screen using Surfaces and Sprites , but what about
interacting with those objects? NME provides quite an array of features for interaction, whether with a
mouse or keyboard.
Pages:
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022