I can only really echo most of what has been said already. Your only real mistake was playing A-rag in the first place, the rest was just bad luck.
Playing A-rag suited is tempting because of the nutz flush possibilities, but if you think about it, it's hard to see how there can be much profit in it (some will disagree with me) but here's how I look at it.
1) Your odds of flopping a flush are about 118/1 against. If you do get lucky, it's not going to be a very well disguised hand, and you may not get the pay day that you were expecting.
2) Your odds of flopping a flush draw are about 8/1 against. If someone is sitting with a made hand, if he/she is a half decent player, you won't get the pot odds
to chase the flush.
3) If you don't get your flush or flush draw, but do pair your A, then you've got problems - but I don't need to tell you that, sadly you found out the hard way.
My advice would be to stay away. If you must
be tempted, then only play A-rag suited from late positions if there are at least 3 limpers before you and no raise.