Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently September 28th, 2024, 9:19 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: OpusScript Get Color/Set Color actions
PostPosted: July 2nd, 2005, 7:09 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi
I'm continuing to work on a project that allows viewers to clone graphic objects, drag and drop them into a diagram, and needs to reproduce these in their dropped location upon the viewer's re-opening of the publication (so they can edit/change them).

I've figured out, with Opus Support's help, a way to save and reproduce the objects, the latter using a master copy. However, the viewer also has the option to change the cloned graphic objects by hiding color quadrants. The subsequent use of a master only re-inserts un-customized clones.

Is there a way to script an action that can read/save whether one or more quadrants (can be considered separate objects, if necessary) are hidden and then use this information to hide or show that quadrant when a master copy is cloned for re-insertion into the re-opened publication? The alternative work-a-round would be a way to read/save the color of each clone's quadrant and then use this to re-insert a customized copy with the correct color (s) showing.

In looking at the OpusScript, I'm unable to find a "get" whether hidden or not, or a "get" color for an object other than a button.

Thanks for any ideas to solve this challenge.

Kind Regards,
Stephen
swartel@nycap.rr.com


Top
 Profile  
 
 Post subject:
PostPosted: July 13th, 2005, 9:46 am 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
what are these color quadrants? example will help...
Is the image edit performed in Opus?


Top
 Profile  
 
 Post subject: OpusScript Get Color/Set Color actions
PostPosted: July 13th, 2005, 11:54 am 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Hi

I've figured out how to create a frame, comprised of 4 vectors, and set up a right click trigger so that the viewer can clone the frame and its 4 constituent vectors. I've alse set up a trigger of double left click to hide a vector, so that the viewer can tailor the appearance of the items.

The problem is that, not knowing if or how many cloned versions the viewer will create, I have no object names to use for other scripting actions for these cloned objects. Sinec at the time I am creating the publication, these future cloned items are not yet created, they do not appear in the publication and therefor don't have identifying names.

For example, cloneable object "A" comprised of FrameA and Vectors A1, A2, A3 and A4 exists in the publication and scripting of these can be done (like FrameA.GetPosition and A1.SetPosition). However, if the viewer chooses to clone these 5 times, there are no labels for FrameA Clone1, FrameA Clone 2...etc. So, you can't write a script
FrameAClone1.SetPosition or FrameAVA3ClonedObject.GetPosition.

I wonder if there is a way to have names/labels for each cloned object.

Thanks for any assistance with this.

Kind Regards,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: July 13th, 2005, 12:26 pm 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Since the cloned items will only be available at run time, I assume an info store will be required on the users session to capture items that have been created during the run and which should be new "original" items next time the user runs the publication.

Please check this two script functions

GetName()
GetUniqueObjectID() (for the cloned item....)

sample....


this_char = this.GetName()
unique = this.GetUniqueObjectID()


Top
 Profile  
 
 Post subject:
PostPosted: July 13th, 2005, 1:57 pm 
Offline

Joined: October 26th, 2004, 10:23 am
Posts: 666
Location: Digital Workshop
Store references to the clones in an array and you can as easily access to them as the original. Eg
Code:
MyArrayOfClones[index] = original.CloneObject();
MyArrayOfClones[index].SetPosition(....

_________________
ddww Opus Developer


Top
 Profile Visit website  
 
 Post subject: OpusScript Get Color/Set Color actions
PostPosted: July 13th, 2005, 4:20 pm 
Offline
Godlike
Godlike

Joined: November 11th, 2004, 1:18 pm
Posts: 1213
Location: New York
Opus: Opus Pro 9.75
OS: Windows 10 Pro 64 bit
System: Core i7, 16G RAM, Nvidia 640GT (desktop), plus Windows 10 and Android tablets
Thank you for these suggestions. I've never worked with arrays, so I have some learning to do first. Then, I can try these ideas.

Kind Regards,
Stephen


Top
 Profile  
 
 Post subject:
PostPosted: July 13th, 2005, 11:52 pm 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Might find this useful to start with....

Have included some further array functions contributed by Chris Jones that you might find useful.....


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


Top
 Profile  
 
 Post subject:
PostPosted: July 18th, 2005, 12:09 am 
Offline

Joined: November 28th, 2004, 6:05 am
Posts: 141
Location: USA
To: eomc40, Paul G, and anyone who downloaded "Logo.zip"

The Array.prototype functions included in that template were created
by Paul G. Unfortunately, eomc40 has given me credit by mistake.
While I would love to have created this very exceptional bit of script,
the work is not mine, and the credit belongs to Paul G.

Cheers
Chris

_________________
Opus Resources and Services


Top
 Profile Visit website  
 
 Post subject:
PostPosted: July 18th, 2005, 9:24 am 
Offline

Joined: November 11th, 2004, 1:43 pm
Posts: 172
Location: Buckinghamshire, UK
Chris,
Will update my resource items with Paul's name...Thanks


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

All times are UTC [ DST ]


Who is online

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