Search code examples
actionscript-3actionscriptair

Change Scrollpane content height to a fixed value


I have an AIR app with a "settings" area. It is loaded in a scrollpane. Initially all the settings were in a movieclip scrolled by the pane. But now the settings are too many and I decided to place some buttons to go in the appropriate area. I can't load the whole content of the scrollpane pressing the button as I want to allow the user to change various settings, in various areas and press "save" just at the end (swapping the pane content I lose the unsaved settings). So I decided to place various MC inside the content and turn them on and off with "visible" property.

The problem is that the scrollpane keeps the height of the higher MC even if it is not visible, so i need to set "scroll just 300 pixel" as I click on a button. Is there a way to do that still keeping the scrollpane component active (and not writing a custom scroller)?

Thanks Nadia


Solution

  • Yeah everything visible or not counts in dimensions. You can simply resize the bigger clip when it's not visible so it's smaller than the visible clip.