# Math.newProperty

**URL:** <https://forum.kirupa.com/t/math-newproperty/179926>\
**Category:** flash\
**Created:** [February 24, 2006, 12:13am UTC](https://forum.kirupa.com/t/math-newproperty/179926 "2006-02-24T00:13:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![malidia](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/malidia/32/684_2.png) [@malidia](https://forum.kirupa.com/u/malidia)\
**Post date:** [February 24, 2006, 12:13am UTC](https://forum.kirupa.com/t/math-newproperty/179926/1 "2006-02-24T00:13:18Z")

</div>

Hello,

I just bought the ActionScript Cookbook from O’Reilly, and on chapter five it starts adding properties to the Math class, such as

```auto

Math.randRange = function(minNum, maxNum, decPl){
//content for the new property would go here
}

```

but when i try to add flash give me a “There is no property with the name 'randRange '.” error. This might be a new rule with flash 8 (which i have)?

So, i guess I don’t understand why it’s giving me this message, if a popular published book often refers to doing such a thing.

and would something like this fix the problem:??

```auto
randRange.prototype = new Math();
randRange = function(minNum, maxNum, decPl){
//content for the new property would go here
}

```

anything to help me understand the problem i am running in to would greatly be appreciated.
