Digital Workshop http://forum.digitalworkshop.co.uk/ |
|
On/off button http://forum.digitalworkshop.co.uk/viewtopic.php?f=29&t=3866 |
Page 1 of 1 |
Author: | Lori [ December 9th, 2009, 11:13 am ] |
Post subject: | On/off button |
How can I create an off/on button? Or have I missed such a thing ready made somewhere in the galleries? I have Opus Creator 6 and run WinXP. - yes I have read the user guide and searched this forum....but I haven´t found anything. What it should do: Left click on it (button A) should show a button B, next left click on A should hide button B, click again and button B reappears etc. Just like switching on and off music. Please anybody let me know the principal procedure. The on/off button: this is really very important for my publication. |
Author: | mackavi [ December 9th, 2009, 12:09 pm ] |
Post subject: | |
Hi Lori, I know that you'd rather not script but it's really easy for this. You simply 1. create two buttons - buttonA and buttonB 2. on buttonA add a 'left click trigger' 3. on this trigger add a script action 4. in the script action add the following line. buttonB.IsShowing() ? buttonB.Hide() : buttonB.Show() This will hide /show buttonB when you toggle buttonA. If you want to understand the script it does the following: 1. buttonB.IsShowing() - checks whether buttonB is showing and return true if it is. 2. ? buttonB.Hide() -the question mark bit is what happens if true - in this case hide the buttonB because it's currently showing. 3. : buttonB.Show() - the colon bit is what happens if false - in this case show buttonB because it's currently hiding. Hope this helps, Mack |
Author: | Lar_123 [ December 9th, 2009, 12:26 pm ] |
Post subject: | |
Opus and related products give you several ways to accomplish a thing. Here's another idea for your Button A and B. Assuming you want the result to be: press something 'down', it stays 'down' and music is 'On'. Press same button again, it returns to 'up' and music is turned 'Off'. 'Yes' you wanted to have the button be 'different' or look 'different' too. You can achieve this somewhat... using a single button. In Creator, pay close attention to the button Object's properties (that is, bring up the Properties dialog box and make appropriate settings). 1-- set the Button Type or its options... to be "Push Button" (I think it's called). 2-- Notice that there are Button 'States'. Default, for example, can have its own color and its own Text Label. Then Click on the Button-Down state, and change the colour and label for that state. Note: Be sure to click again back on the Default ICON --- so that Creator uses that as the initially shown state. Important to remember. So all that is left is to assign your Actions (according to the triggers of mouse-click and/or the conditional for its state of 'down' or 'up'). I think the help files or manual will reinforce more clearly how this is done. Cheers. |
Author: | mackavi [ December 9th, 2009, 1:17 pm ] |
Post subject: | |
Unfortunately, button states relate only to appearance not actions. You'd still need to script on / off bit. However, if you prefer to cheat - it's not really, then create one button for on and one button for off and simply use the hide show actions for the on / off buttons which are placed on top of each other. As one is hidden the other appears and vice-versa. Each button would control it's own aspect of buttonB, but it would seems that it was a single button turning it on or off. A little Opus Magic as compared to the Opus Science in the first post Regards, Mack |
Author: | Lori [ December 9th, 2009, 6:20 pm ] | ||
Post subject: | |||
Hello and THANK YOU all for your help! I tried mackavi´s way first and it worls! I was lucky because I didn´t even know how to select a script action (which? variable? programming? what?) After a few minutes of guessing I came up with a combination that let me paste in mackavi´s lines - and it works!!!!! see attachment, - for all the other sufferers who are in desperate need of a switch button like me........ Surely I will try out Lar_123´s and demofred´s suggestions as well! Also I will meditate upon mackavi´s explanations of what the terms mean...who knows, one day I might get scripting.... Thank you sll again!
|
Author: | mackavi [ December 9th, 2009, 11:29 pm ] | ||
Post subject: | |||
Hi Lori, I don't have Creator installed but if you have access to a script action it would be better to use that. It would be on the programming tab. If you don't then that is damn clever work around Kudos to Fred, the action based method is very straightforward for non scripting version of Opus. Mack
|
Author: | Lori [ December 10th, 2009, 1:45 pm ] |
Post subject: | |
thanks mackavi - no I don´t have a script action in opus creator ..... is it worth upgrading to pro?????? - only opus pro has that and I am afraid it would take me years to take advantage of such an investment. The screenshot I posted yesterday with your lines in.....it works great that way and I would say: never change a winning team....I have been working today with it for some hours and love it. The other methods I will try as well..... Thanks anyway! |
Author: | mackavi [ December 10th, 2009, 3:12 pm ] |
Post subject: | |
Lori wrote: I am afraid it would take me years to take advantage of such an investment.
Morning Lori, I'd imagine that if you're apt enough to work out how to add scripting without a scripting action then you'd probably find it a rather effective way of developing publications. That said, Pro is an expensive upgrade that mostly offers advanced features such as SCORM and ODBC as well as an ECMA based scripting language. If you're developing publications with lots of actions then script can make it much easy, quicker and thus cost effective - and IMHO fun! BTW, it's best to add a signature to your profile (link at top). Regards, Mack |
Page 1 of 1 | All times are UTC [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |