9/25/2007 10:12 PM | |
Joined: 12/8/2006 Last visit: 2/27/2020 Posts: 170 Rating:
|
hi, |
10/1/2007 2:29 PM | |
Posts: 1275 Rating:
|
Hi, You'll probably need a script for that... But for the increase to still happen while the user is pressing the button, you could copy the script you wrote in the mouse action to the "Object Change" event, within "Miscellaneous". Since when the user keeps pressing the slider the little bar tends to change position, the action will be triggered. But you'll need to work on how to make sure the interval is 1s... Check this thread, which mentions the kernell sleep function. Best regards, Danielle |
10/2/2007 2:47 PM | |
Joined: 10/31/2006 Last visit: 9/21/2022 Posts: 134 Rating:
|
Here is a simple example which may not neccessarily be the best, but should give you some ideas to play with. I added a rectangle and put a script on a 1 second cycle under the line color attribute. Then based on what color the backround is it will either add or subtract. I then put an actionon the press left and release left to change the color of the rectangle. The rectangle is not displayed.I used an internal tag ( Float ) called Val1 Regards Shane AttachmentSlider.zip (130 Downloads) |
Last edited by: CromptonS at: 02.10.2007 14:48 |
|
10/16/2007 3:01 PM | |
Posts: 84 Rating:
|
Hi I want to make Horizantal Bar my mean is filling a rectangle from left to right ? Is it possible ? |
10/18/2007 9:06 AM | |
Joined: 10/31/2006 Last visit: 9/21/2022 Posts: 134 Rating:
|
Here is an updated version with a bar and the when you click once. This is just to give you an idea of how to go about setting it up yourself. Probably better ways to do it. For your time calculation you could maybe take the initial value and write it to an internal tag when you press the button ( on the press left event ) and then read the value when you release the button ( release left event ) and subtract the two. You can thendivide the difference by the increment amount you set (0.01) and that multiplied by your tme trigger ( 1 sec ) should give you your amount of seconds the buton was down for.Not exactly accurate but it does seem to work. Add3 tags to your project"Val1" , 'Val2" and "Time" Best Regards Shane AttachmentSlider.zip (101 Downloads) |
Last edited by: CromptonS at: 18.10.2007 09:45Last edited by: CromptonS at: 18.10.2007 09:36Last edited by: CromptonS at: 18.10.2007 09:17 |
|
Follow us on