I thought I had the solution when I realised I was adding the event listener for the zoom to the stage rather thant to the image/movie clip I want to be able to zoom in on.
I had this:
So I changed it to this:
I did this because it works on the swipe gesture that's been working fine:
gallery_items.addEventListener (TransformGestureEvent.GESTURE_SWIPE, fl_SwipeToGoToNextPreviousFrame);
What's happening is that the swipe function works, then when I go to the frame with the zoom image on it that works too. But then when I go back to the swipe frame it doesn't work.
But now I've changed the event listener to the movie clip rather than the stage I'm getting this error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
at TUESDAY_fla::MainTimeline/fl_ClickToGoToAndStopAtFrame_8()[TUESDAY_fla.MainTimeline::fram e1:145]
Even tried removing the event listener for the zoom function when returning to the swipe gallery frame:
stage.removeEventListener (TransformGestureEvent.GESTURE_ZOOM, fl_ZoomHandler);