in AS2 -> yup
in AS3 -> nope

----- Original Message ----- 
From: "Marcelo de Moraes Serpa" <[EMAIL PROTECTED]>
To: "Rákos Attila" <[EMAIL PROTECTED]>; <[email protected]>
Sent: Thursday, August 09, 2007 3:18 AM
Subject: Re: [Flashcoders] Fuse is adding up instead of tweening the difference


Hi Rkos,

Typecasting to Number() did the trick (i.e: Number(initHeight)). I'm
intrigued however.

Let me explain: The value comes untyped from a XML file (loaded through
pixlib's ConfigLoader). Once it is in the player (untyped Object), I assign
it to a variable of type number. Then I pass it to a method that then does
the following:

var initWidth:Number = initialWidth;
var initHeight:Number = initialHeight;

I thought that this would be enought to typecast my XML retrieved untyped
value to number but it seems that, even though I'm typing the variables to
be a Number (var:Number), Flash Players doesn't typecast the values to
Number. It only does so if I explicity call the typecast function Number()
passing the variable as an argument. Is this expected behaviour for
ActionScript 2 ?

Thanks again,

Marcelo.



_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to