Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Sidney de Koning
Hi Matt, Try casting it to the XML data to a Number. Because XML data is a String. Like so: var rectangle:Rectangle = new Rectangle (0,0,Number([EMAIL PROTECTED]),Number([EMAIL PROTECTED])); Hope This helps. Sid On May 28, 2008, at 4:43 PM, Matt S. wrote: So I tried to the do the

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Viktor Hesselbom
Hi Matt, It's quite obvious that Rectangle doesn't have scaleX and scaleY. Why would you need it for the Rectangle class anyway? What use for it could you possible have? / Viktor H On Wed, 28 May 2008 16:43:04 +0200, Matt S. [EMAIL PROTECTED] wrote: So I tried to the do the following: var

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Matt S.
Hmm, that didnt help. It seems to be recognizing it as a number, and I can set the Width and Height of Rectangle, but when I try to set the scaleX and scaleY is when I get the error message. .m On Wed, May 28, 2008 at 10:56 AM, Sidney de Koning [EMAIL PROTECTED] wrote: Hi Matt, Try casting it

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Ricky Bacon
Matt S. wrote: So I tried to the do the following: var rectangle:Rectangle = new Rectangle(0,0,[EMAIL PROTECTED],[EMAIL PROTECTED]); if(cS.height rectangle.height){ rectangle.height = cS.height; rectangle.scaleX = rectangle.scaleY; } But it gives me the following error: 1119:

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Helmut Granda
If you take a look at the Rectangle public properties scaleX and scaleY is not listed: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/geom/Rectangle.html#propertySummary Maybe you can wrap the rectangle with a sprite and then you can scaleX and scaleY ..helmut On Wed, May 28,

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Helmut Granda
to add to Sid's comments From the docs: *Note:* The Rectangle class does not define a rectangular Shape display object. To draw a rectangular Shape object onscreen, use thedrawRect() method of the Graphics class. ...Sid... could you elaborate on using the Rectangle class to measure objects on the

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Sidney de Koning
Hi Matt, For what do you want to use the Rectangle? Normally you would use it for instance to measure objects on the stage (at least i do ) For what you are doing cant you use a Shape? or a Sprite? Sid On May 28, 2008, at 5:10 PM, Matt S. wrote: Hmm, that didnt help. It seems to be

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Sidney de Koning
Ofcourse :) Right now I'm working on a project that does involve a scrollbar. What i do with the Rectangle class is i measure the handle of the scrollbar and use it for the bounds to drag it to. Like so: _maxScroll = _track.height - _handler.height; _bounds = new Rectangle( _handler.x,

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Matt S.
On Wed, May 28, 2008 at 11:04 AM, Viktor Hesselbom [EMAIL PROTECTED] wrote: Hi Matt, It's quite obvious that Rectangle doesn't have scaleX and scaleY. Why would you need it for the Rectangle class anyway? What use for it could you possible have? What use could I possibly have? well, one

RE: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Romuald Quantin
-and- image-ratio/ Romu -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sidney de Koning Sent: 28 May 2008 16:48 To: Flash Coders List Subject: Re: [Flashcoders] Rectangle doesnt have scaleX/Y? Ofcourse :) Right now I'm working on a project that does involve

Re: [Flashcoders] Rectangle doesnt have scaleX/Y?

2008-05-28 Thread Matt S.
May 2008 16:48 To: Flash Coders List Subject: Re: [Flashcoders] Rectangle doesnt have scaleX/Y? Ofcourse :) Right now I'm working on a project that does involve a scrollbar. What i do with the Rectangle class is i measure the handle of the scrollbar and use it for the bounds to drag