0

I am creating a card game and want to record all the movements of cards after login and choosing the seat.

can anyone help in this that how could i record all appears in swf??

Thanks

Swati Singh
  • 1,863
  • 3
  • 19
  • 40

1 Answers1

0

then you need to create some class:

IterationTracking or something, and after each iteration in your game just record them to array, or send to server

IterationTracking.addAction ( Iterationtracking.TYPE_SEAT_CHANGE, userID, [table, seat] );

IterationTracking.addAction ( Iterationtracking.TYPE_CARD_RECEIVED, userID, [H_Q] );

IterationTracking.addAction ( Iterationtracking.TYPE_CARD_FOLD, userID, [H_Q, H_4] );

IterationTracking.addAction ( Iterationtracking.TYPE_CARD_ON_TABLE, userID, [H_Q] );

function addAction ( type : String, userID : int, data : Array )
{
    var action:Object = new Object();
        action.userID = userID;
        action.type = type;
        action.data = data;

    actions.push ( action );

    // and if you need to do something on specific iteration then just switch case solution.
    switch ( type )
    {
        case TYPE_CARD_RECEIVED :
            //your actions
            break;

        case TYPE_CARD_FOLD :
            //your actions
            break;

        // etc...
    }
}
Jevgenij Dmitrijev
  • 2,228
  • 1
  • 15
  • 23