# Problem with localToGlobal

**URL:** <https://forum.kirupa.com/t/problem-with-localtoglobal/234561>\
**Category:** flash\
**Created:** [August 3, 2007, 11:09am UTC](https://forum.kirupa.com/t/problem-with-localtoglobal/234561 "2007-08-03T11:09:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glidias](https://avatars.discourse-cdn.com/v4/letter/g/e36b37/32.png) [@Glidias](https://forum.kirupa.com/u/Glidias)\
**Post date:** [August 3, 2007, 11:09am UTC](https://forum.kirupa.com/t/problem-with-localtoglobal/234561/1 "2007-08-03T11:09:07Z")

</div>

```auto

        public function YBranch(controller:YTree, v:int, thick:Number, len:Number, rot:Number):void
        {
            
            _theBoss = controller;
            _lvl = v;
            
            this.rotation=rot;
            
            if (_lvl>=_theBoss.maxlevel) {
                // Add leaf node and exit
                var pt:Point=this.localToGlobal( new Point(0,0) );
                trace(pt.y);
                _theBoss.addLeafNode( new YNode(pt.x, pt.y, rot));
                return;
            }

```

Note: YNode is simply a class that extends Point but it has an additional rotation property. Every YBranch does not scale itself. It only rotates itself and draws an appropate length.

I’m creating a fractal tree and at the end of the recursion, it adds leaf nodes to the \_TheBoss Tree which draws the leaves into bitmapData.  
But why does the traced pt.y and .x return zero (ie. (0,0) point???
