Hi Susan, You need to recheck your coordinates - if you remove the line: star.graphics.moveTo(startPosX + factor*144, startPosY + factor*277);
- you'll see a weird shape on the stage. So your error lies somewhere in the numbers, not the class structure. Cheers, Karina > -----Original Message----- > From: [email protected] [mailto:flashcoders- > [email protected]] On Behalf Of Susan Day > Sent: 03 March 2010 2:10 > To: Flash Coders List > Subject: [Flashcoders] My Star > > Hi; > > I have the following code: > > package > { > import flash.display.MovieClip; > public class Star extends MovieClip > { > public function Star() > { > var startPosX:int = new int(); > var startPosY:int = new int(); > var factor:Number = new Number(); > startPosX = 100; > startPosY = 500; > factor = 0.07; > var star:MovieClip = new MovieClip(); > addChild(star); > star.graphics.lineStyle(1, 0xFFFFFF); > star.graphics.beginFill(0xFF0000); > star.graphics.moveTo(startPosX + factor*144, startPosY + factor*277); > star.graphics.lineTo(startPosX + factor*188, startPosY + factor*184); > star.graphics.lineTo(startPosX + factor*288, startPosY + factor*170); > star.graphics.lineTo(startPosX + factor*216, startPosY + factor*98); > star.graphics.lineTo(startPosX + factor*232, startPosY + factor*0); > star.graphics.lineTo(startPosX + factor*144, startPosY + factor*47); > star.graphics.lineTo(startPosX + factor*55, startPosY + factor*1); > star.graphics.lineTo(startPosX + factor*72, startPosY + factor*100); > star.graphics.lineTo(startPosX + factor*0, startPosY + factor*170); > star.graphics.lineTo(startPosX + factor*99, startPosY + factor*184); > star.graphics.endFill(); > } > } > } > > I created an empty *.fla to test and entered class "Star" (the name of > this > *.as) in the Properties. The stage is 1000*500. It doesn't draw my > star! > Now, I tested this in another *.as file before I pulled it out to > create its > own class and it worked. I added a trace at the end of the class when > it > failed in my test fla and it traced. What gives? > TIA, > Susan > _______________________________________________ > Flashcoders mailing list > [email protected] > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

