Stanley is not a national capital. It is a town located in the Central District of Hong Kong, on the southern side of Hong Kong Island. Known for its market, beaches, and colonial-era architecture, Stanley is a popular tourist and residential area — but it has never served as a capital city.
If you're thinking of a capital named Stanley, you might be confusing it with Stanley, the capital of the Falkland Islands — a British Overseas Territory in the South Atlantic. That Stanley is a capital, but it's not in Hong Kong.