So i’m doing a game in black jack game in flash (for my new footer) and it’s going great except for trying to get the dealer to have some sort of intelligence about drawing new cards.
I want him to hit if he’s under 17, and stand at 17 and over.
Unfortunately, when I put the code in on the last frame of my card movie:
[AS]
if(_global.cardtotalx < 17){
duplicateMovieClip(“cardx”, “newcardx”, 12);
setProperty(“newcardx”, _x, “220”);
}
[/AS]
it won’t duplicate the card.
I’ve tried the exact same code in an onClipEvent(load) and on onClipEvent(enterFrame) handler on the actual movie clip, just in case flash was picky about the code location, and it still didn’t work. I tried it on a button, however, and it worked just fine. My question is, is Flash finicky about duplicateMovieClip as a non-button triggered action? Normally I can get it to work, but always in a for loop. So CONFUSED!
I wish I could post the .fla, but I’m at work. Just wondering if there’s a simple explanation. Otherwise I’ll make it work somehow.
Thanks guys.
–EP