Button to control objects position

mobile-prototyping
newbie-question

#1

Hello!

I’m using the scroll to widget function. I would like to have: on tap of a button > scroll shape to hot spot. I am struggling as it feels like I can’t get the button to trigger the shape to move to a specified point using the scroll to function.

If anyone could help with this it would be greatly appreciated!

Thanks!


#2

I think it is difficult to understand what you’re trying to do without seeing it. If the tips below don’t help you, could you post an .RP file to demonstrate what you are trying to do?

Scrolling moves the page, not widgets on the page, so I’m not sure what you mean by “scroll shape to hot spot”. If you have a shape (e.g., rectangle widget) and a hot spot widget on the page, scrolling would not change their position on the page, nor their positions relative to each other. One exception is a dynamic panel that has been pinned to the browser–such that it “floats” in front of the page and does not move position relative to the screen when the page is scrolled.

If you are trying to scroll the page in order to get a widget on that page to a specific location (relative to the screen or browser window,) such as the top or bottom of the page, or to get a specific widget to be placed where another widget currently appears, or to get a widget underneath the cursor, etc.) then the Scroll To Widget action can work. An important thing to realize is the page can’t scroll beyond its boundaries, so if you are trying to get a widget placed at the bottom of a page to appear in the middle of or top of the page, it won’t work. Basically, the page runs out of room to scroll at the bottom of the bottom-most widget. In this case, you can place a hotspot well below everything else, so the page has room to scroll.

However, if you are trying to move a widget so that it is in same location as (behind or in front of) another widget, then you’ll want to use the Move action. This can be combined with the Scroll To Widget action if the target widget is not in view.

Take a look at this example
Scroll-To vs Move-To.rp (46.8 KB)

Here is an example of scrolling within a dynamic panel from a few years ago. Same principles apply to scrolling within a page.