What you need is to install the non-free-codec pack which includes flash and all other codecs. You will also need a mozilla browser plugin, which by default is totem with Ubuntu. Go here
scroll down to adding repository. Open a terminal & then copy and paste the commands for adding the repository
and gpg key
for your current distro (assuming its Ubuntu Ibex).Once added, its easy from here.
The download for non-free-codecs will include fonts and many other things, its about around a 300mb download. Open a terminal and type these commands.
sudo apt-get install non-free-codecs
That's it for flash and java support and many other codecs. And along with other video, audio formats.
Totem should by default now play all other video, audio formats in your browser.