Digital Workshop

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

All times are UTC [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Easy or not possible? object properties on different page
PostPosted: January 14th, 2009, 5:25 pm 
Offline

Joined: January 9th, 2009, 5:10 pm
Posts: 7
Hi there,


This will either be really easy or not possible:

I'm trying to change the background image of an object that is on a different page to the one being viewed using Opus script.

The code to change an object on the current page is like this:

image1.SetImage(imagepath)

However I want to run the script on page 1 to change an object on page 2 - I'm guessing if the command exists it would be something like this:

page2.image1.SetImage(imagepath)


The idea is for the resource to be preloaded before page 2 loads. I can't use resource manager as the imagepath links to images that maybe new since the publication was published

I have Opus 6.4.

Any suggestions would be appreciated.


Cheers,


Paul


Top
 Profile  
 
 Post subject:
PostPosted: January 14th, 2009, 6:46 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Whilst it is feasible to access the properties of an object from another page - the easer way to achieve this is to simply store the path of the image as a variable on page one and use this variable on page two.

The variable needs to be defined as a global variable in the publication properties.

I'm assuming that you're switching from page one to two. If this is a dual monitor issue with both pages showing then use an on variable change trigger, on page two, to detect and update the image.

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:
PostPosted: January 15th, 2009, 10:18 am 
Offline

Joined: January 9th, 2009, 5:10 pm
Posts: 7
Thanks for the reply - didn't even think to use a variable.

This isn't multimonitor application so won't need the trigger.

Out of interest if I change the variable on page 1 will the images then be cached before loading page 2?

I'm effectively trying to preload these resources as when I load directly on page 2 it takes about 10 seconds to load them.

Page 2 is used to display up to 30 different product thumbnails at a time so I have 30 image objects on the page. There are 4 different product catagories. On the page when you click on a different product catagory button it will change the images and label of each image object to products in that catagory. This is read from a network drive - hence why it is slow to load.

I guess I could 120 image objects (30 for each product catagory)and use show and hide actions for each set of 30. I still need to preload the images before the page loads though...

Any ideas would be great.


Thanks for your time,


Paul


Top
 Profile  
 
 Post subject:
PostPosted: January 15th, 2009, 11:38 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
Paul,

My PC loads a 900kb jpg image on Opus page with almost no perceptible delay.

Check your Pub Properties settings (and also Opus Editor options). If Bilinear sampling is 'on', it is doing extra processing on the image file. Also there was a recent Post a couple months ago that mentioned 'getting images near to the dimensions' that a Page image object will be.

There's also some suggestions in Opus Help files... search 'optimization', or perhaps Optimizing.

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


Top
 Profile  
 
 Post subject:
PostPosted: January 15th, 2009, 12:00 pm 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
Hi Paul,

Unfortunately, the preload resources action is limited to hard coded paths. perhaps the use fo variables here could be added to the wishlist.

My understanding of resources, is that they load into memory when called unless added to one of the preloaded options. But as you are using images dynamically this is not possible.

I wonder then whether resources would remain in memory across pages. If this is the case, then you could load these resources on page one in a hidden or off page frame by using your setimage command once the variable has updated.

If this works, then the image would already be in memory when page two loads. However, this does seem unlikely as it would mean that Opus publications would simple eat up more and more memory as publications progressed.

Alternatively, I would suggest looking at the design of the publication as to what is loading that is causing such a long delay. For example, if these 30 image thumbnails are in fact simply the high editions resized using Opus, then consider producing thumbnails from the original files outside of Opus and using these in Opus and linking to the large images for you mouse over /clicks.

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:
PostPosted: January 15th, 2009, 12:33 pm 
Offline

Joined: January 9th, 2009, 5:10 pm
Posts: 7
Hi,

Plenty of food for thought from both of you. I shall give your ideas a try.

I think the issue is the speed of loading from the network drive rather than a local drive more than the size of the files themselves. I have used Bilinear too so I'll disable that.

It would be good for future versions to be able to cache resources using Opus Script.

Thanks for the advice and for taking time to reply.

Cheers,

Paul


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

All times are UTC [ DST ]


Who is online

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