AvriCard :

AvriCard is a little MooClass designed for Lord Of Castle New Frontier.
There is no many options, because it's for a very specific usage, but it's easy to add some features if you need it !
It's not based on Drag.moves class and droppables Element, because I dont like the fact you need to have the mouse over the element to start the event. If you have big cards it can be bad !

Download AvriCard ( AvriDeck + AvriCardSlot):

download uncompressed

Exemple :

demo : (just drag the cards over the slots)

Syntax :

  1. // The most easy way :
  2. //we first create a couple of deck
  3. var deck1 = new AvriDeck ($('deck1'),{top: 400, left: 100, zIndex: 9999});
  4. var deck2 = new AvriDeck ($('deck2'),{top: 400, left: 300, zIndex: 9999});
  5. var deck3 = new AvriDeck ($('deck3'),{top: 400, left: 500, zIndex: 9999});
  6. //next we create the slots
  7. avriSlot = new AvriCardSlot([deck1, deck2, deck3], 'cardSlot', {container: 'divCarte', widthCard: 165, widthSlot: 240, heightSlot: 213, numSlot: 4, urlOverLight: './contourLumineux.png'});

Options :

AvriCardSlot

  • container: '', // The id of your container (limit of the card's drag)!
  • widthCard: 165, // int !
  • widthSlot: 200, // int (can be > widthCard, if there is a free espace between 2 slot):
  • heightSlot: 300, // int
  • numSlot: 20, // int

Methods :

none

ChangeLog :

v 0.1 - 12 September, 2009

  • first release

v 0.1.1 - 14 September, 2009

  • Tips bug fixed