Added functionality to verify that the swf is loaded and ready and that the js api is ready