This content has been marked as final.
Show 6 replies
-
1. Re: Remove scroll bar when not needed
kglad Jan 29, 2008 7:41 AM (in response to hierkosmo_DC)what's a sidebar?
// sb is the Instance name of the sidebar
sb.swapDepths(this.getNextHighestDepth());
sb.removeMovieClip();
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. -
2. Re: Remove scroll bar when not needed
hierkosmo_DC Jan 29, 2008 7:54 AM (in response to hierkosmo_DC)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.
Thanks again.
SMC -
3. Re: Remove scroll bar when not needed
kglad Jan 29, 2008 11:05 AM (in response to hierkosmo_DC)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? -
4. Remove scroll bar when not needed
hierkosmo_DC Feb 1, 2008 9:38 AM (in response to hierkosmo_DC)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? -
5. Re: Remove scroll bar when not needed
hierkosmo_DC Feb 1, 2008 9:47 AM (in response to hierkosmo_DC)forgot to add the code. Thought I was on the right track but it didn't work -
6. Re: Remove scroll bar when not needed
kglad Feb 1, 2008 7:10 PM (in response to hierkosmo_DC)remove the first line of code and sb should be removed.