Returning varibales from event handler functions


Look at my code below

import fl.transitions.Tween;
import fl.transitions.easing.*;
var id:Number;

next_btn.addEventListener(MouseEvent.CLICK, goNext);
function goNext(event:MouseEvent):void{
var num = test_mc.x;
var fadeTween = new Tween(test_mc,“x”,Regular.easeInOut,num, num- 530.8,0.5,true);
id = test_mc.width - 530.8;


The variable id which is declared globally is changed in the function goNext. I need the variable to retain the value, but it gets reset as the function is not returning. I tried the return method but that’s not working either. Please Help.