My AS code was good the problem was I needed to click on the Stage option "Automatically declare a stage instance" Thanks to everyone here that helped. Great community.