Select something without naming it directly

I want to select a widget based on where it is in the window or if positioning relative to the view. I will have a lot of widget and if i do it manually I will need to name each one, it will create a lot of else statements, it may slow down the prototype, and it will be very repetitive and hard to alter.


These are story steps and they should be set selected ast they are the center focus of the page on scroll. Like I said above it could be as a scroll gets between two scrollY points but that isn’t efficient. Is there a way to set them selected when they go over another widget or someother way that doesn’t require many else statements.

sorry for the rambling, just trying to make it clear.
Any help would be great

In the interaction conditions, there is “If area of widget X is over area of widget Y.” If you created a hot spot or transparent widget for your central area, then onMove of each widget you could use that condition to set the widget to selected if it’s over the central area.

I’m not sure how your widgets are moving in and out of the central area, so I haven’t attempted to create a sample .rp for this, but there should be a combination of interactions and conditions that should work for your exact case.

Try this out:

https://o1rlp1.axshare.com

SelectionOnPageScroll.rp (64.0 KB)

If you want your widgets to be selected only when the page is scrolled, then you can’t use their OnMove event, because they don’t move relative to the page. You can use the page’s OnPageScrollUp and OnPageSrollDown events to trigger an action on each widget, then have that action (e.g., OnRotate) do something like select itself.

This method uses a dynamic panel which is pinned to the browser so that it does not move when the browser page scrolls–whereas the rest of the page elements do move relative to the browser frame as the page scrolls

This does require you to fire each widget’s OnRotate event, which could potentially slow things down if you had many of them. If that’s the case, consider putting them in a repeater.

Thanks, this is what I need. I kind of forgot that I could use the THIS selector so then it would be copy and pasting the same interaction every time. Sometimes you just forget things. I’m not sure if there is an axure way to only have the interaction on one widget only.

Thanks. I think you were in the right direction, my brain just didn’t figure out how to use if x is over y.
mbc66 built what I needed too, he was right in guessing scrolling because i probably forgot to mention it.

There is, and this is what I meant by “putting them in a repeater.” Although, it turns out that for many repetitions this doesn’t really keep from slowing things down…

Here is an updated version with one widget in a repeater. I did a few things to make the “story line” weave like you show above, which you can see in the OnItemLoad event in the repeater.

SelectionOnPageScroll.rp (96.6 KB)

I missed that part in your post. I had thought about repeaters but like you said this version seemed fairly delayed, and not usable for my needs (each step wouldn’t be consistently placed like in the example). I think your first response was a good solution because it doesn’t require changing code on each dot, just on the focus area, and copy-pasting the dot code.
Thanks for the effort you put in.

On the first example is there a reason why you have the Rotates on onWindowScrollUp AND onWindowScrollDown?