var loader:Loader = new Loader();
flash has an issue with you using the var “loader” Name it to something else