# Error #2136 when making new Object

**URL:** <https://forum.kirupa.com/t/error-2136-when-making-new-object/251336>\
**Category:** flash\
**Created:** [February 7, 2008, 2:56pm UTC](https://forum.kirupa.com/t/error-2136-when-making-new-object/251336 "2008-02-07T14:56:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AnindJazzMan](https://avatars.discourse-cdn.com/v4/letter/a/f05b48/32.png) [@AnindJazzMan](https://forum.kirupa.com/u/AnindJazzMan)\
**Post date:** [February 7, 2008, 2:56pm UTC](https://forum.kirupa.com/t/error-2136-when-making-new-object/251336/1 "2008-02-07T14:56:06Z")

</div>

I just want to use some variables out of another class, but when i make a new instances using the code from the error-class i get this error:

Error: Error #2136: The SWF file file:///C|/Users/David/Desktop/Game/Game.swf contains invalid data.  
at error$iinit()  
at Game$iinit()

```auto
package {
    import flash.display.Sprite;

    public class error extends Sprite {

        public function error() {
            var test:Game2 = new Game2();
        }
    }
}

```

This is the code i want to take the variables from:

```auto
package {

    import flash.display.MovieClip;

    public class Game2 extends MovieClip {

        public var xke:int = stage.stageWidth/2;
        public var yke:int = stage.stageHeight/2+150;

        public function Game2() {
            var fout:error = new error();
        }
    }
}

```

this last class Game2 is used as document class.
