About movieclip and condition

here it is :

I have 1 MC called “fruitmc” it contains 4 frames : orangeA(1st frame) ,orangeB(2nd frame) ,appleA(3rd) and appleB(4th).

Now what I want to do is :

User swipe down the orange,the orange will be in lower position (in my case y = 326,25)
when in lower position,user has a choice whether to put out the orange like in the first position (y = 216,25) or to make the ORANGE sing(play sfx),and change it appearance to frame(2) /orangeB.

if user chose the ORANGE to sing,then the ORANGE can still be put out.

When the ORANGE is out,user can click the ORANGE to change to APPLE,and the APPLE can sing too similar to ORANGE.

so user can choose ORANGE or APPLE.

But I’m really confused with my code after days of coding,
here is my code :

var fruit:String="orange";
var fruitposition:String="out";

Multitouch.inputMode = MultitouchInputMode.GESTURE;
fruitmc.addEventListener(TransformGestureEvent.GESTURE_SWIPE , orangeinbasket);
function orangeinbasket (e:TransformGestureEvent):void{
    
    if (e.offsetY == 1 && fruitposition=="out" ) {
    //User swiped towards bottom
    fruitmc.gotoAndStop(1);
    fruitmc.y = 326,25;
    fruitposition="in";
    trace("ORANGE is in!");
    fruitmc.removeEventListener(TransformGestureEvent.GESTURE_SWIPE,orangeinbasket);
    fruitmc.addEventListener(MouseEvent.CLICK,orangesfx);
        function orangesfx(event:MouseEvent):void
        {    fruitmc.gotoAndStop(2);
            trace ("ORANGE sing!");
            fruitmc.removeEventListener(MouseEvent.CLICK,clickfruitmc);}
            }
        
fruitmc.addEventListener(TransformGestureEvent.GESTURE_SWIPE , orangeoutbasket);
function orangeoutbasket (e:TransformGestureEvent):void{
        
    if (e.offsetY == -1 && fruitposition=="in") {
    //User swiped towards top
    fruitmc.gotoAndStop(1);
    fruitmc.y = 216,25;
    fruitposition="out";
    trace("ORANGE is out!");
    fruitmc.removeEventListener(MouseEvent.CLICK,orangesfx);
    fruitmc.removeEventListener(TransformGestureEvent.GESTURE_SWIPE , orangeoutbasket);
    }
    }}

in this code I’ve not added sounds yet,so don’t bother on that,just making sure for what I want to make.

anyone can help me? :puzzle::puzzle:
Thank you.