Display Project

I am creating a custom photo gallery, and i want the different galleries to load when the user presses the button that corresponds with a gallery. I made a class called gallery button who’s constructor takes in a Label Argument and A Gallery Name Argument. Now when this button is clicked it creates a new gallery object and passes it the gallery name argument so that the HSP_Gallery Class can load and display the pictures.

function onClick(evt:Event)
{
var myGallery2:HSP_Gallery = new HSP_Gallery(evt.target.name);
addChild(myGallery2);
}

The problem is that when the button is clicked the gallery wont show.

Now i have put in trace statements that show the arguments getting passed correctly, but still no gallery.

The only time the gallery shows is when i call the HSP_Gallery Class without the button being clicked like this:

var myGallery:HSP_Gallery = new HSP_Gallery(“gallery.xml”);
addChild(myGallery);

If more of my code is needed please let me know.
I know its probally something small i over looked, i would really appreciate it if someone helped

Thank You In Advance