# Constructer as an argument

**URL:** <https://forum.kirupa.com/t/constructer-as-an-argument/250422>\
**Category:** flash\
**Created:** [January 29, 2008, 2:04pm UTC](https://forum.kirupa.com/t/constructer-as-an-argument/250422 "2008-01-29T14:04:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![superpeppe](https://avatars.discourse-cdn.com/v4/letter/s/a183cd/32.png) [@superpeppe](https://forum.kirupa.com/u/superpeppe)\
**Post date:** [January 29, 2008, 2:04pm UTC](https://forum.kirupa.com/t/constructer-as-an-argument/250422/1 "2008-01-29T14:04:41Z")

</div>

Hi there

lets say I have defined a class called “Point3d”, the file is containing the following code:

```auto
package {
    public class Point3d {
        public function Point3d(x:Number, y:Number, z:Number) {

        }
    }
}

```

Somewhere in a class called “Plane” I have the following constructor:

```auto
package {
    import Point3d;
    public class Plane{
        public function Plane(position:Point3d = new Point3d(0,0,0)) {

        }
    }
}

```

As you can see, the default value is a Point3d(0,0,0), but when I compile this using the flex 2 compiler, it says “Parameter initializer unknown or is not a compile-time constant”, how do I work around this?
