This content has been marked as final. Show 6 replies
what's a sidebar?
// sb is the Instance name of the sidebar
that code is for removing a scrollbar with instance name sb. and you don't want to place the code there before the scrolbbar is added. place it so it executes WHEN you want to remove the scrollbar.
Sorry, I meant Scroll Bar as the content in my post indicates (working on 4 hours of sleep here :-) )
My follow up question to you would be, if the scrollbar pops up as soon as the page is loaded wouldn't the best place to put the code be at the begining of the code? Again, I'm a novice at best with coding so I'm trying to learn.
I'll keep toying with it to understand but thought I'd throw the question out there.
no. that code cannot work unless it executes AFTER sb is created. so, you must know where, in your code, sb is created. and, you probably only want to remove it when it's not needed (ie, the textfield to which it's linked has a maxscroll property of 1).
so, where's your sb created? with what textfield is it associated?
If I'm following you, the Scrollbar was created using the UI, no code involved, on a seperate layer than my AS. The instance name given to the scrollbar is sb.
You saying I have to create the "sb" in the code layer and associate it to the "theText" Dynamic Text field where the bar should show up?
forgot to add the code. Thought I was on the right track but it didn't work
remove the first line of code and sb should be removed.