Hi benoit
nav_button.page=pgname works like this.
nav_button = the clone
nav_button.page = creates a new property of the clone "page"
nav_button.page=pgname = assigns the contents of the var "pgname" to the new property
Now, each clone has a property called "page" so you can call the value
like this
this.page
Whenever you call this from a clone, it will return the value that was
stored in it. (in this case the value of pgname)
Two names
This is done so you can call the specific clone from a script.
If you call "circle.14255252" from a script, the script thinks your
calling an object called "circle" with a property called "14255252".
Of course, the script finds "circle" (the original object which was cloned)
but does not find the property "14255252" and returns an error.
So we use this code to assign an "alias" to each clone
eval("clone"+num+"=circle.CloneObject()")
This way, we can call the clone without an error by using the alias assigned.
clone0.Move(20,20)
clone1.GetPosition()
clone2.Hide()
.........
Hope this clears it up for you.
Cheers
Chris
_________________ Opus Resources and Services
|