several manufacturer are designing integrated switchers for flyback switched mode power supplies like: www.irf.com www.powerint.com (topswitch) www.st.com (viper)
refer to their application notes for details (specially powerint !!!) about transformer design and construction, closing the feedback loop, and isolation using optocoupler.
With regard to a switched mode power supply, does anyone have a circuit for a switched mode power supply for converting 220v ac to 12v dc at 500ma? I have a bit of a space constraint so a conventional linear power supply cannot be used.