AS3 Tip of the Day →← Create Apollo Apps with Flash CS3

AS3 Tip of the Day

So it appears DataType Number cannot be tested against null conditions. In order to determine if a Number has no value you must use the function isNaN(num) which returns a Boolean. That’s right boys & girls a Numbers initial value is Not a Number ;-) Oh AS3 you confound me!

May 9th, 2007  by Stephen  /  6 Comments

Comments on “AS3 Tip of the Day”

  1. Wow that’s pretty wierd but I guess it makes sense since everything else is null when you first initialize it. Still that is some good info to know.

    Thanks for the tip as usual.

    Rich on May 9th, 2007 at 12:40 pm
  2. Go to www.choosejesusrightnow.com & click on BUMPER STICKERS.

    Karen Finley on May 10th, 2007 at 7:13 am
  3. Choose Jesus Right Now! hahaha Thanks Karen!

    Caleb on May 10th, 2007 at 11:36 am
  4. Also, to set an argument of datatype Number (and you do not want a default of a Number) use NaN as well.

    Stephen on May 22nd, 2007 at 7:45 pm
  5. where

    kit on May 27th, 2007 at 11:21 am
  6. […] More info here, here, and here. […]

    FlashApe » Blog Archive » Undefined Numbers in AS 3 on August 6th, 2007 at 9:10 pm