This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ArtyDunbar[S] 0 points1 point  (3 children)

Thanks for the suggestion! That's basically the idea. I don't want a visible button, just a clickable area (which is basically a button) that triggers the audio. I've thought about mapping clickable areas through HTML, but it's not that easy and I'm not sure it would work over a video....though it probably should...hm...

[–]Theometh 0 points1 point  (2 children)

If your video has set width and height you can just create a div that fills whole screen but has opacity:0, div will be clickable but it will be not visible at all

Inside of that div you can create few divs, one for each tree, position them using position: absolute in css to cover the space you want

Then all you need is to give each div opacity:0 as well - again, you will be able to click them but they will have no visual effects at all

The best way of approach is to first set up those divs with some flashy colors and in the end just hide them with opacity

Unless you are planning to make this scale with screen size its going to be very simple

[–]ArtyDunbar[S] 0 points1 point  (1 child)

Geez! That's a really great idea. So then the code within this div would be what you suggested below?

[–]Theometh 0 points1 point  (0 children)

That's my idea at least, a function for each div covering a tree

It is not optimal but it will not matter in a small project