Ok, this is what I have so far - but it gives me an error saying that I am missing a semicolon somewhere, but I cant figure out where. Basically what I want it to do is when the button is clicked a random number is generated, then one pic is hidden, one is shown - then after a pause, that pic is hidden and a different one is shown.
<mx:Button x="220" y="10" label="Shuffle the Cards" fontFamily="Times New Roman" fontSize="18" fontStyle="italic" fontWeight="normal"
click="
var shuffleDeck:Function = function shuffle():void {
var randNum:Number = Math.floor(Math.random()*(4))+1;
pic.visible = false;
shuffle.visible = true;
}
setTimeout(shuffle,100);
shuffle.visible = false;
select.visible = true;
"/>