Syntax 2 For animation controls
Description
Displays a specific frame in an AVI clip in an animation control.
Controls
Animation controls
Syntax
1 |
<span>animationname</span>.<span>Seek</span> ( <span>s</span><span></span> ) |
Argument |
Description |
---|---|
animationname |
The name of animation control displaying |
s |
A long value in the range 0 to 65,535 |
Return Values
Integer. Returns 1 for success and -1
for failure.
Usage
Seek displays the specified frame. If you
specify a value that is greater than the number of frames in the
clip, Seek displays the last frame in the clip
and returns 1. If you specify a value that is not in the specified
range, Seek does nothing and returns -1. If the
animation was playing, Seek always triggers the
Stop event.
Examples
This code in a button’s clicked event displays
the frame specified by a number in a single line edit control, then
increments the number by one. Each click of the button advances
the clip by one frame:
1 |
// instance variable number<br>integer li_return<br> <br>number = long (sle_seek.text)<br>li_return = am_1.<span>Seek</span>(number)<br>number +=1<br>sle_seek.text = string(number) |