# Math code?

**URL:** <https://forum.kirupa.com/t/math-code/97613>\
**Category:** Uncategorized\
**Created:** [December 25, 2003, 10:12pm UTC](https://forum.kirupa.com/t/math-code/97613 "2003-12-25T22:12:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iceman](https://avatars.discourse-cdn.com/v4/letter/i/46a35a/32.png) [@iceman](https://forum.kirupa.com/u/iceman)\
**Post date:** [December 25, 2003, 10:12pm UTC](https://forum.kirupa.com/t/math-code/97613/1 "2003-12-25T22:12:23Z")

</div>

Hi everyone,

I just purchased Robert Penner’s book and I was looking at part of his explanation of “static objects”. He implements his own Math function, the code is:  
[AS]Math.cube = function (x){  
return x_x_x;  
}  
trace(Math.cube(20));[/AS] According to Mr.Penner, the trace function will give 8000, however, when I entered this in the actions window the output is two error messages. I am using Flash MX 2004. I was wondering why this is happening, and if anyone could help me clear this up.

Thanks A Lot  
:cap:
