Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 1:52 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: cloneObject
PostPosted: October 28th, 2010, 10:14 pm 
Offline

Joined: June 13th, 2010, 7:15 pm
Posts: 7
Location: The Netherlands
Opus: Pro 8
OS: Windows 7
System: HP Desktop
Have a small question...
Is it possible to delete multiple cloned objects?

Jan


Top
 Profile Visit website  
 
 Post subject: Re: cloneObject
PostPosted: October 29th, 2010, 12:40 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
Jan,
'Yes'. That subject has been covered a few different ways in other Posts. Since you only asked a general question and have not posed a specific situation, I suggest you Search for 'topics' in the forum here.

Try:
array clones

or:
destroy clone

>>> I think the key or the trick is to learn how to keep track of clones -- either by naming them as they are created, or by storing them in an array when they are created. Posts discuss that.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject: Re: cloneObject
PostPosted: October 29th, 2010, 10:30 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Example of using arrays.

http://www.live.interaktiv.co.uk/index. ... Itemid=166

Just add your clones to the elements and loop through to delete them.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject: Re: cloneObject
PostPosted: October 30th, 2010, 6:49 pm 
Offline

Joined: June 13th, 2010, 7:15 pm
Posts: 7
Location: The Netherlands
Opus: Pro 8
OS: Windows 7
System: HP Desktop
Thank you both...
I was just looking for the wrong 'word' as I searched for delete instead of destroy :wink:
I have used Arrays now and it works very well.

* Create cloned objects *
var myClone = new Array();
while (n < 10)
{
myClone[n] = ABC.CloneObject(Xpos,Ypos);
n++;
}

* Delete cloned objects *
for (n=0;n<10;n++)
{
myClone[n].DestroyClonedObject();
}


Jan


Top
 Profile Visit website  
 
 Post subject: Re: cloneObject
PostPosted: November 2nd, 2010, 8:17 am 
Offline

Joined: July 12th, 2009, 10:33 am
Posts: 124
This may or may not be of any use, but I found it a less problematic to hide rather than destroy clones. It depends what you are doing with them.
Cheers
Dan

_________________
V9.6. Windows 10. Testing on PC, Mac, iPad.


Top
 Profile Visit website  
 
 Post subject: Re: cloneObject
PostPosted: November 2nd, 2010, 9:22 am 
Offline

Joined: August 22nd, 2005, 11:56 am
Posts: 125
Location: The Netherlands
Opus: Pro 9.75 (Build 16749)
OS: Windows 10 Pro 64-bit
Hi Dan,

I have a small map of Holland in my publication which shows the location of WW-II Allied Aircraft Crashes in The Netherlands. The dots on the map are drawn once you have queried a database, so the dots on the map can change completely when you request new data (for example when you change the type of aircraft, base or squadron)... Therefor I delete (destroy) the clones and not just hide them...

Jan

_________________
"World War II Allied Aircraft Crashes in the Netherlands & North Sea" (Made with Opus Pro 9.75), available via https://www.airwar4045.nl


Top
 Profile Visit website  
 
 Post subject: Re: cloneObject
PostPosted: November 2nd, 2010, 11:42 am 
Offline

Joined: July 12th, 2009, 10:33 am
Posts: 124
Hi Jan
I realised you didn't want the clones. I was using a lot of scripts that ran through arrays for about 30 settings on each clone. It was just easier to hide the clones when they were finished with rather than designing the scripts to take account of missing elements in each array.
Anyway, if the problem is solved then it's not a problem.
Cheers
Dan
:)

_________________
V9.6. Windows 10. Testing on PC, Mac, iPad.


Top
 Profile Visit website  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group