[Xerte] Animate draw objects?

Paul Swanson Paul.Swanson at harlandfs.com
Fri Aug 31 16:31:39 BST 2007


Thanks, Julian.
 
I was close:  the object rb2 is referring to an empty graphic icon, my
use of createEmptyMovieClip seemed to be the problem. When I removed
that, along with the object name it created, the code I was using
worked.
 
Paul


________________________________

	From: xerte-bounces at lists.nottingham.ac.uk
[mailto:xerte-bounces at lists.nottingham.ac.uk] On Behalf Of Tenney Julian
	Sent: Friday, August 31, 2007 12:08 AM
	To: Xerte discussion list
	Subject: RE: [Xerte] Animate draw objects?
	
	
	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/f18bb64c/attachment.html


More information about the Xerte mailing list