Audio control scroll bar

Q&A about the latest versions
Post Reply
Owen ki
Posts: 20
Joined: Mon Aug 21, 2023 9:46 am

Hi,

I want to make audio control icon with scroll bar which can control by mouse drag , not by clicking button or something.
could you let me know how to do that ?

thanks,
User avatar
Hopki
Gnome
Posts: 13029
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
Use the Seek Bar element in the skin editor, you select which file it should work with.
See: https://ggnome.com/doc/pano2vr/create-s ... s/seekbar/
Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
Owen ki
Posts: 20
Joined: Mon Aug 21, 2023 9:46 am

thanks for the information.

but I want to control only volume level by mouse drag, except play time.
is it possible ?
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Owen,
but I want to control only volume level by mouse drag, except play time.
Quite a while ago I'd created a component "Playlist" in response to a request on the Facebook User Group https://www.facebook.com/groups/p2vr.ga ... 659272572/

I read your post on the forum and, using the existing component I've added a volume slider that may be what you are looking for.

preview.jpg
preview.jpg (214.63 KiB) Viewed 12295 times

You can view the project here: https://p2vr.s3.ap-southeast-2.amazonaw ... index.html. The volume is set to 50% when the project loads, then moving the mouse left and right along the slider will change the volume in 10% increments. Clicking on the "-" will set it to 0% and clicking on the "+" will set it to 100%.

Note: as this was just a test I used 10% increments but it could be smaller than that.

The way it's done is to have a number of rectangles that when the mouse is over them they change a variable and the volume to the setting of the rectangle. To show the progression I have another rectangle that sits on top of the percentage value rectangles that uses a size logic block, in the additive mode, to change it's width in response to the rectangle value that the mouse is over.


mobile_5.png
mobile_5.png (826.6 KiB) Viewed 12295 times
mobile_3a.jpg
mobile_3a.jpg (1.35 MiB) Viewed 12295 times

Regards,

Tony
Last edited by Tony on Mon Aug 28, 2023 2:45 am, edited 1 time in total.
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
Owen ki
Posts: 20
Joined: Mon Aug 21, 2023 9:46 am

thanks tony,

but URL won't be opened :(
Last edited by Owen ki on Mon Aug 28, 2023 2:49 am, edited 3 times in total.
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Owen,

Link fixed in original post. Here it is: https://p2vr.s3.ap-southeast-2.amazonaw ... index.html

Tony
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
Owen ki
Posts: 20
Joined: Mon Aug 21, 2023 9:46 am

thank you for your help, Tony

but is it also possible to control volume by click and drag ? not by just following a mouse cursor ?
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Unfortunately there is no built in slider like that.
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
Owen ki
Posts: 20
Joined: Mon Aug 21, 2023 9:46 am

Thank you for your kind answer Tony,

Could you share the entire skin file ?
User avatar
Tony
Posts: 1342
Joined: Mon Feb 15, 2010 6:54 am
Location: Adelaide, South Australia
Contact:

Hi Owen,

Here's a link to the updated project: https://p2vr.s3.ap-southeast-2.amazonaw ... index.html

I've attached a zip file with all the project files.

Note: the slider is disabled on mobile as you can only change audio via the buttons on the mobile phone.

regards,

Tony
Attachments
Playlist-Volume-Slider.zip
(7.8 MiB) Downloaded 253 times
Tony Redhead | Panoramic Photographer | mobile: +61438501002 | website: https://tonyredhead.com - https://redsquare.com | Pano2VR Tutorials: https://tonyredhead.com/pano2vr | instagram: https://www.instagram.com/tonyredhead/
Owen ki
Posts: 20
Joined: Mon Aug 21, 2023 9:46 am

thanks Tony, you're my hero :)
Post Reply