Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently January 6th, 2025, 10:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: I want a global button on every page .. but how
PostPosted: November 18th, 2004, 1:18 pm 
Offline

Joined: November 4th, 2004, 10:18 am
Posts: 44
Location: Bromley, Kent
Opus: Version 7
OS: XP Home SR3
System: 3.4GHz Pentium 4, 1GB RAM, ATI Radeon X300 with 256 MB on board
I have a publication with numerous chapters and pages within each.

I have decided to add voice over descriptions as well as textual descriptions, but I want toi give the user the option to switch Voice Over off.

Thus, I have designed a 'speaker' button set that goes on every page.

I have set the buttons properties to 'Checkbox - Push on Push off, and linked it to a Global variable (audio_global).

Obviously, I want the button, if depressed (yes to voice over) to show depressed on every page, until mouse-clicked again. Then I want it off on every page.

Problems - the button doesn't show depressed on each page once pressed for one page.

I'm not sure how to use the programming side of it - I tried 'If audio_global is True' (then play sound) but that doesn't seem to work.

I'm patently doing it all wrong - the manual/on-line help states this is the way to handle what I'm trying to do, but .... any advice/tips/pointers ... even a demo imp - would be greatly appreciated!

_________________
Mike


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 18th, 2004, 7:12 pm 
Offline

Joined: November 4th, 2004, 10:18 am
Posts: 44
Location: Bromley, Kent
Opus: Version 7
OS: XP Home SR3
System: 3.4GHz Pentium 4, 1GB RAM, ATI Radeon X300 with 256 MB on board
OK, I've solved it by not using the 'button' as an object, but by using two graphics within a frame instead (one for off, one for on) - and a global variable. The variable is set at the start to -1, then multiplied by -1 for each mouse-click on the graphic to provide a toggle. On show, the variable is checked for which graphic to show - and obviously, the variable is checked to determine whether or not to playback the VO on each page.

It works. But I'd sure like to know if there's a way to have a globally maintained button on every page - if depressed on one, it shows as depressed on all. At the moment, its status is reset whenever a new page is opened, although the variable associated with it is maintained throughout the publication.

Perhaps I was expecting something that doesn't actually exist.

_________________
Mike


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 19th, 2004, 1:59 am 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Hi Mike,

In regards to the "Push Button" -- I had a look at this and I was surprised when using the push button (default down) on a Master Page, that when going to other pages (linked to the Master) that the button state would change if the button was intitially down. Not sure if this is a working correctly or not in 04.21. :?:

You can use SetState() to make the button appear up or down (true or false), but when it updates, as you move from page to page, you see a split-second of the button up (false) before being set to down (true).

One workaround could be to set the button in a small Chapter window (without border/title bar) so it appears integrated on the page, however beware if changing screen resolutions. Possibly "Panels" could be used but I have only experimented with them.

Maybe someone better at scripting could help, or you approach your pub differently. e.g. not have a push button, but just a button that a user clicks on that brings up a pop-up window. All problems would be solved then. Anyway, that's my feedback on the Global Button method. Hope someone else can add further to this. :)

_________________
Cheers,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: November 19th, 2004, 9:40 am 
Offline

Joined: November 4th, 2004, 10:18 am
Posts: 44
Location: Bromley, Kent
Opus: Version 7
OS: XP Home SR3
System: 3.4GHz Pentium 4, 1GB RAM, ATI Radeon X300 with 256 MB on board
Steve - thanks for confirming that I'm not going totally nuts! And thanks for taking the trouble to investigate it.

I did have a look at the script thing for showing the button down, but as yet I have not used the Opus script language at all (Java?) - to be honest, I left all my programming skills behind many many years ago (C and OPL). As it happens, the condition you state - the button is up then drops down - I'd see as a bit of a handicap. Instead of attempting to use the script stuff, I took what is probably an easier route for me.

I simply created a frame containing just two image objects - images I've created to blend in with the theme, showing the 'audio on and audio off states. Now I know the method works, I may well add another image for 'mouse-over'. As mentioned, I have a global variable - on showing a page (and the frame), the variable is examined, and depending on its state the appropriate image is displayed. The variable is given a value of -1 for false (initial state). A Left click on the frame multiplies the variable by -1, and the variable is then examined to display the appropriate image again, true being greater than zero of course. Initially I had a delay of 0.2 sec between a changeover, thinking that would be necessary - but it shows as a 'blink': I removed the delay - and now its as smooth as silk.

And it works. I could have made the images look like a button - up or down - but instead decided to use a lamp type image, shining red or green.

One thing - during the development of all this, I left the original button - tied to the same global variable, on the screen - and every time my 'frame' was clicked, the button went down (or came up again). So, the 'link to variable' does work if on the same page (as one would expect). Maybe it should be made to work also across pages - as I at least would expect? Or maybe there should be an option to have it work across pages??

DP??

_________________
Mike


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 19th, 2004, 2:06 pm 
Offline

Joined: October 26th, 2004, 1:26 pm
Posts: 262
Mike Shaw wrote:
Maybe it should be made to work also across pages - as I at least would expect? Or maybe there should be an option to have it work across pages??


Hi Mike,

I have made some enquiries about issues using Push Buttons with Master Pages. (I have sent DW a sample IMP) :?

So will keep you updated when I find out. :wink:

_________________
Cheers,
Steve


Top
 Profile  
 
 Post subject:
PostPosted: November 19th, 2004, 3:22 pm 
Offline

Joined: October 25th, 2004, 12:27 pm
Posts: 526
Location: Digital Workshop
Hi,

Thank you for your enquiry.

The problem is that the contents of the Master page are not persistent across pages, and the content is reloaded each time you navigate to any page which utilises the master page. This therefore causes the button to be reset to its initial state when you change pages.

To create an on/off style button whose state remains persistent, you need to ensure that your button is placed on a page which is never reloaded. The easiest way to achieve this is to use the Layout functionality (Publication > Publication Properties > Layout). This basically allows you to split your publication into frames, with different pages occupying each frame. Navigating to a new page in one frame does not affect pages displaying in other frames, so placing the on/off button in one of these frames should ensure that it behaves in the required fashion.

I hope this helps. Please do not hesitate to contact me if you have any further queries.

Kind regards,

_________________
Robin Garrett
Digital Workshop Technical Support


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 19th, 2004, 7:30 pm 
Offline

Joined: November 3rd, 2004, 2:22 pm
Posts: 54
Location: Kent, Ohio, USA
I did a similar thing for one of my publications. I did use frames and a publication variable to turn a voice-over narration on and off. I also use a set of three objects to control it. I had a pair of buttons to turn on and off the v/o. They were set up as a radio button set so if you pushed one the other one released. Pushing the on and off buttons set a varialbe value. I then had a frame that had two images in it, one with a speaker, the other with a speaker with a no symbol over it. The speaker image would change according to which button was active.

_________________
Tom Hutchins
The Davey Institute
Kent, OH
800-445-8733
http://www.davey.com

Opus ProXE 5.5
Windows XP SP2


Top
 Profile Visit website  
 
 Post subject:
PostPosted: November 19th, 2004, 11:33 pm 
Offline

Joined: November 4th, 2004, 10:18 am
Posts: 44
Location: Bromley, Kent
Opus: Version 7
OS: XP Home SR3
System: 3.4GHz Pentium 4, 1GB RAM, ATI Radeon X300 with 256 MB on board
Thanks for all the feedback.

I'm happy now with the solution I came up with using a 'grouping' frame on each page - may add another graphic for mouse-over, but it is working well and is robust.

But ... I really must get down to learning this Scripting language. I guess I need to get a Java book - and work at it. :(

_________________
Mike


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

All times are UTC [ DST ]


Who is online

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