Hi all! I’m building a presentation that’s supposed to look like a Windows-like OS. So when a new application is opened, an icon representing it appears to the left in the bottom task bar (like it does in Windows). And when you open another application, an icon should appear to the right of the one that was already there.
The tricky part here is that the applications can be opened in any order and therefore don’t have a given place on the task bar – any of them could be opened and should place itself to the left in the task bar, but to the right of the ones already opened, if any.
This mechanic would be quite useful in many situations, I think – in short: having the first activated object appear at a certain place and the next one to the right of, left of, above or below the one(s) already there, instead of at a locked x/y coordinate as normal.
I’m fairly new to Hype, but have a pretty good understanding of most of the interface and love it already, truly! I don’t have any skills in JavaScript (or any other coding language), except for having copied and pasted a few times, and have a limited understanding of the logic in it. I have a feeling that JavaScript is necessary for this task, but if there’s another way, it’s even better (maybe it can be done with physics? I haven’t worked with that yet).
Attached is a file in which I fake this function (I just made two scenes, one if you click the first object, another one if you click the other one). So if you make a preview of it and click the blue circle first, it will be placed to the left and the green to the right, when you click that, and vice versa if you click the green one first (refresh to restart). Hopefully this gives you an idea of what I want to do. There are only two objects here, but there could be several, possibly spread over multiple scenes, and in such complicated scenarios doing what I just did would be a massive work load and would quickly become very messy.
In another scenario one might want to always add the newest object to a fixed location in the beginning of the row (to the left), replace the second newest one and push it and the other ones (if any) a place to the right. I was considering this method for an inventory in a game, but it could be used in many ways. There might also be multiple rows, so when an object reaches the right edge, it jumps down to the left of the row below (this could also be the case in the first mentioned example). I haven’t made an example of a scenario where new objects push old ones ahead, I think you can imagine it, but tell me if you want me to. However, this is probably more advanced and is less important.
I hope I made myself clear, otherwise please tell me what I need to add. I don’t have any idea of how to achieve this, so I’ll be grateful for any inputs, if you do
PS: If you were wondering: I wanted to add tags, but no matter what I write, it says “No matches found” and won’t let me add it. It must be a bug.
User specified object order.hype.zip (27.7 KB)