I don't know if it can be done like you want to, playing the animation forward and then backward. You can however create two animations using the same frames. One animation for the flower opening and another one for the flower closing.
Then whenever the player interacts with the flower overlapping it or not you just change the animation it should be playing.
Awesome idea! I still don't get how I'd make the 2nd animation play if the overlapping sprite leaves the active area though..
I might play with boolean instance variables or something for "on/off" switches in the animation functions.. never thought of that.