Wait a few seconds before doing something

Hi, I’m New to flash and I can’t seem to figure this out, I just want to make something visible for 5 seconds then make it invisible again.

on (release) {
ap._visible = true
// wait 5 seconds
ap._visible = false
}

Thanks in advance