[Xerte] Animate draw objects?
Tenney Julian
Julian.Tenney at nottingham.ac.uk
Fri Aug 31 08:07:33 BST 2007
You need to draw into an icon, and then animate the icon you draw into.
animate is a method of the ICON class that all icons inherit from. ICON
itself inherits from MovieClip.
So, add an empty graphic to a page, give it an ID, say myIcon.
In script under the graphic, use the ID to draw into the icon:
myIcon.beginFill(0xFF0000,100);
myIcon.drawRect(0,0,100,100);
then you can animate it:
myIcon.animate(300,300,10,'linearTween');
Julian
________________________________
From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Paul Swanson
Sent: 30 August 2007 23:26
To: Xerte discussion list
Subject: [Xerte] Animate draw objects?
Is there a way to animate an object created with the drawRect()
method? If I draw a box with:
rb2.createEmptyMovieClip("red_box", 0);
rb2.red_box.lineStyle(2, 0xFF0000, 80);
rb2.red_box.drawRect(190, 42, 170, 19, 0);
... I would expect that rb2.red_box.animate(190, 62, 10,
'linearTween'); would work, but it doesn't. The box is created, but
doesn't animate. animate() works fine moving the contents of a text icon
around.
Not a big deal, just wondering if there is a way ...
_____________________________
Paul Swanson
Instructional Designer
Harland Financial Solutions
_____________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.nottingham.ac.uk/pipermail/xerte/attachments/20070831/c9389fe6/attachment.html
More information about the Xerte
mailing list