Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 22nd, 2024, 11:56 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Cloned objects
PostPosted: December 21st, 2005, 12:00 am 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Working on clones,
Have several objects that are cloned and their display imformation i.e. x, y coordinates and the rotate angles saved to file.

I am stuck in re-registering the recreated clones as follows

On opening the file as the data-driver for the subequent opening of the publication, I stripped out the value from file to point to the original images


file contents
--------------
Object1.2147483648 345.046 422.5 230.5
Object3.2147483649 345.046 548.5 67.5
Object4.2147483650 345.046 572.5 359.5

reading the line to get i.e. Object1, Object3 and Object4

var line_Array = readline.split("\t")
var line_object = line_Array[0].split(".")

Now the hurdle I can't get my head round is the clone event, managing to clone to location but can't capture the clone name

This is what I need

myClones[num] = this.CloneObject(160,90,true);
num++


above was used in the initial run to create and register the position of the clone.

But can only get the eval to work as follows

var position = thisobject + "." + 'CloneObject(line_Array[2],line_Array[3],true)'
eval(position)


This does clone and position as per line_Array[2],line_Array[3]. but appears like the created objects are not can't be referenced for events required such as
DestroyClonedObject()

Any help will be appreciated...


Top
 Profile  
 
 Post subject:
PostPosted: January 11th, 2006, 11:32 am 
Offline

Joined: October 25th, 2004, 12:32 pm
Posts: 397
Location: Digital Workshop
Please take a look at page two of the attached example this shows how to:

Create clones
Save clone details to disk
Read clone Information back from disk
Delete clones from screen.

Hope this helps

Brenden Knifton


You do not have the required permissions to view the files attached to this post.


Top
 Profile Visit website  
 
 Post subject:
PostPosted: January 11th, 2006, 2:45 pm 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Thanks Brenden,
Previously forced to use "eval" but couldn't have sorted the "." in the name, resulted in an IF/ELSE construct to get the actual object name which allowed eval to work.
Thanks again,


Top
 Profile  
 
 Post subject:
PostPosted: January 11th, 2006, 3:50 pm 
Offline

Joined: October 25th, 2004, 12:32 pm
Posts: 397
Location: Digital Workshop
Your welcome, sorry it was a little late but you had posted just before we broke up for Christmas and it had been overlooked.

Regards

Brenden Knifton


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 53 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