3 Mar 2008 15:10
Novice help - animating a view on mouseout
I'm a novice with OpenLaszlo, though I work a lot with Flex. I'm
learning OL to possibly use the LZC compiler to generate
SWFs as part of a batch process, and as well as a learning exercise.
I've got a question about mouse tracking and animating a multiimage
resource on mouseout and OL is different enough from Flex that I'm a
little stumped.
I've reduced my code to the relevant parts below. This LZX loads 18
frames (in this case) into a view, and using mousetracking switches the
current frame (using setResourceNumber) based on the position of the
mouse on the x plane. This much works fine.
When the mouse leaves the view I'd like to trigger the sequence of
frames to play as a looping animation, regaining mouse control only when
the mouse enters the view. I've tried adding a onmouseout handler to
call play() on the view but I can't get anywhere.
What am I missing?
Thanks,
Roger Howard
----- Example below -----
<canvas width="320" height="240">
<resource name="spinframes">
<frame src="001.jpg" />
<frame src="003.jpg" />
(Continue reading)
RSS Feed