It was a criminal act, the killing of the US ambassador to Libya along with three of his staff. The protesters who entered the US embassy compound in Egypt, replacing the US Flag with an iislamist flag, nearly as bad but at least no deaths.
I would like to offer the viewpoint that the lack of public law and order in the 2 nations does not mean that things were better under dictatorship. Dictators are not good. Khadafi had, 30 years ago, ordered the Lockerbie bombing that killed 270 British and American airline passengers. So I don' regret that Khadafi is dead. Mubarak of course was a dictator who was friendly to the USA and Israel- but that friendliness tended to push the citizens of Egypt in the opposite direction, making them more accepting of Islamic radicals.
Then there is Syria. The embassy attacks are even tempting a few americans to say, let's stop condemning Assad, at least he is not a radical crazy. But Assad has for years operated as an Iranian proxy in Lebanon against Israel. He has caused the USA and Israel a great deal of trouble and even a few lives. And a majority of the citizens of Syria seem to want him gone. If we are so proud of the American Revolution of 1776 to 1781, it seems to me that we cannot treat the citizens of Syria with a different standard just because we are not sure who will replace Assad.
We are of course in an election season, creating a sharp partisan divide. it is also true that we have lots of troubles in the USA right now. It is unrealistic for us to jump into Syria with soldiers and tanks and planes. But I suggest that we should at least reject the temptation to favor foreign leaders just because they will "keep a lid" on their citizens. That's what we did with the Shah of Iran- and we are still paying for that mistake.