Flash button and a favorite url

ive got a button id like to script so when someone clicks will automatically take the visited url and insert it in the favorite’s folder for a url… how would i go about doing this… " ie a homepage "

tried to google and i couldnt find anything…