# Trace() doesnt work inside addEventListener function in Eclipse

**URL:** <https://forum.kirupa.com/t/trace-doesnt-work-inside-addeventlistener-function-in-eclipse/291686>\
**Category:** flash\
**Created:** [July 3, 2009, 6:06am UTC](https://forum.kirupa.com/t/trace-doesnt-work-inside-addeventlistener-function-in-eclipse/291686 "2009-07-03T06:06:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![muhneer](https://avatars.discourse-cdn.com/v4/letter/m/e95f7d/32.png) [@muhneer](https://forum.kirupa.com/u/muhneer)\
**Post date:** [July 3, 2009, 6:06am UTC](https://forum.kirupa.com/t/trace-doesnt-work-inside-addeventlistener-function-in-eclipse/291686/1 "2009-07-03T06:06:31Z")

</div>

I got this weird problem, when i run this code:

```auto
package {
    import flash.display.MovieClip;
    import flash.display.Sprite;
    import flash.events.Event;
 
    public class EDHV_ImageSlider extends MovieClip
    {
        public function EDHV_ImageSlider()
        {
            trace("Initialized");
            addEventListener(Event.ENTER_FRAME, addObject);
                
        }
        
        public function addObject(e:Event):Boolean {
            
              var test:Sprite = new Sprite;
            test.graphics.beginFill(0xFF0000,1);
            test.graphics.drawRect(0,0,100,100);
            test.graphics.endFill();
            test.x = Math.random()*100;
            test.y = Math.random()*100;
            addChild(test);
            
            trace("i");
            return true;
        } 
    }
}

```

In Flash Cs3 it acts exactly as i want, the ENTER\_FRAME runs and the addObject places numerous sprites on the stage. In the window output i’ll see the trace. But when i run this code in Eclipse which is set up to use the Flash Player as output i get the first trace from EDHV\_ImageSlider but the traces inside addObject won’t show up, the sprites however are generated perfect.

The difference between the eclipse setup and the cs3 setup is the fact that the cs3 setup has a \*.fla which calls the \*.as package.

Does anyone have a clue where to look? could it be something in Eclipse?
