If your item classes are card1, card2, card3 and so on, and your code
currently works...
AboutButton.addEventListener(MouseEvent.CLICK, gocard);
function gocard(e:MouseEvent):void {
///
var cardName:String = "card"+String(1 + uint(Math.random()*49)); //
49 is the number of clips you have
var card
Dear Ashim
I didn't understanad hot to do it can you do sample for me with button on
click on the button will insert the card to the stage
I tryed to do it my self I user this code to insert the card from stage but
I couldn't use with your code
this is my code to insert card1 i don't know how t
If you're using AS3, everything in your library that's set to export
for Actionscript will have a unique Class which you need to call to
instantiate it.
Use getDefinitionByName to turn a randomly selected string into a
class definitiion and then call it.
Example:
If your library has 50 objects an
Hi
I'm trying to make game in this game I have 50 movie clip in the library
I want when I click on one button call draw i want to show 7 of this movie
clips on the stage but i want to select randomly 7 of 50 or more or once i
click draw i want to draw one card by one random
can anyone help me ple
4 matches
Mail list logo