# Stage variable

**URL:** <https://forum.kirupa.com/t/stage-variable/303568>\
**Category:** flash\
**Created:** [January 22, 2010, 12:54pm UTC](https://forum.kirupa.com/t/stage-variable/303568 "2010-01-22T12:54:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danny0085](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@danny0085](https://forum.kirupa.com/u/danny0085)\
**Post date:** [January 22, 2010, 12:54pm UTC](https://forum.kirupa.com/t/stage-variable/303568/1 "2010-01-22T12:54:46Z")

</div>

I have this class (.as file) :

```php

package {
    
    import flash.display.Stage;

    public class CustomObject {
    
        public var stage:Stage;
    
        public function CustomObject(stageRef:Stage) {

            stage = stageRef;
        }
    }
}

```

In the main (.fla file)

```php
var objInterfaz:CustomObject = new CustomObject (this);

```

But I got this error

```auto
implicit coercion of a value of type stage

```

Any help is appreciated  
Thanks
