I use the cloning method to display images of cards:
Code:
function clicksFull ()
{
var xPos = 580
var yPos = 670
myClone = new Array()
ImagePath = new Array()
for ( i = 1;i<s;i++)
{
myClone[i] = deck1.CloneObject(485,496)
myClone[i].SetPosition(xPos,yPos,0.1)
ImagePath[i] = deck + "\\" + i + ".jpg"
myClone[i].SetImage(ImagePath[i])
xPos = xPos + xRaz
yPos = yPos - yRaz
}
}
In order to obtain information about the card, I take the name of the object (myName = this.GetName()). All names of clones have the form: deck1.245367177, deck1.245367178, deck1.245367179 etc.
A problem, if I want to reload the page, the names of cloned objects continues. Even its removal with myClone[i].DestroyClonedObject() does not solve the problem. Reset resumed only when the publication closed.
Advise pls which way is better to solve this problem:
1. How does to count cloned objects without rebooting the publication?
Or 2. How to obtain a unique property of the cloned object, so i can get the information in the database.