Search code examples
airadobescrollbarscrollpane

Linking separate UIScrollBar to ScrollPane in Adobe AIR


I'm needing a short scrollbar to be placed apart from its corresponding and longer scrollpane, but am receiving the following error:

ReferenceError: Error #1069: Property maxScrollH not found on
fl.containers.ScrollPane and there is no default value.
at fl.controls::UIScrollBar/updateScrollTargetProperties()
at fl.controls::UIScrollBar/draw()
at fl.core::UIComponent/callLaterDispatcher()

Searching, I can't find a way to access maxScrollH to begin fixing the problem. Trying to access the property my usual way...

ScrollPane_instance.maxScrollH = 1440;

... produces a different error:

Symbol 'Gllryscrn_mclp', Layer 'Gallery', Frame 1, Line 3, Column 19    1119:
Access of possibly undefined property maxScrollH through a reference with 
static type fl.containers:ScrollPane.

I'm briefly self-taught, so apologise for any rookie oversights.


Solution

  • Thought I'd follow up, in case anyone else had a similar problem. I wasn't happy with the degree of customisation of the regular UIscrollbar, so created a second scrollpane to function as a scrollbar instead. I just made the percentage scrolled of the first equal the percentage of the second and vice versa.