the sin() part is really basic, sin() make things evolve from 0 to 1 to 0 to -1 to 0 etc... with the abs() I force it to evolve frome 0 to 1 to 0 to 1 to 0 etc... and then I just have to multiply this value by an amplitude to make the height evolve.
The lerp thingy is just used to quickly go back to the starting size. (If you don't use lerp it will just snap back instantly).
I strongly suggest you learn how it works. Your way is way more complicated. There's too much variables and situations to take into account. Once you get the hang of sine and lerp you will see that things get easier and well... You can use that for so many things.
Anyway, this capx was to demonstrate one thing: you can tweak width and height even with mirror. You just have to always put the mirror at the end of the event list for it to be applied. So you don't have to resort on your animation frame tricks anymore.
Using lerp and sine is not necessary, you can use a variable you increment and decrement for scaling as you already do. (with sine it's just more straighforward)
That's all (: