Maybe you can adapt this to what you are trying to do...



package {
import flash.display.*;
import flash.ui.*;
import flash.events.*;
import...