How does Event.ADDED_TO_STAGE work?

Hello! I’m attempting to initiate a set of variables within a movie clip myElement as soon as it’s dynamically loaded onto the stage:

frame1 within myElement:


this.addEventListener(Event.ADDED_TO_STAGE,  initiateVars); 

function initiateVars(ev:Event):void{     
    var currentY:int = this.y;     
    var currentX:int = this.x; 
}

I’m trying to make this happen only once, and only when myElement is first placed on stage, but the code above doesn’t work. Am I misusing the ADDED_TO_STAGE event?