Getting variable value from a function to out side the function in as3

Hi all,
i’m newbie in as3… please help me that how to get variable value from a function to a text box here is the code :

import fl.controls.ComboBox;
import flash.events.Event;
import flash.events.MouseEvent;
TxtAnswer = Array();

//-----------------------------------
a1.addEventListener(Event.CHANGE,myObject1);

a1.addItem({label:“sandeep”});
a1.addItem({label:“anish”});
a1.addItem({label:“prasanth”});
a1.addItem({label:“vishnu”});

function myObject1(event:Event):void{
var sk1 = a1.selectedItem.label;

}

… i want that variable “sk1” to next scene text box …
i putted the code like this :
q1.text = sk1;

but it is not working…
if anybody knows that please help me …

Thanks in advance :slight_smile:
Sandeep AR