Scroll pane conundrum

i am using the scroll pane component. i’m duplicating some buttons within the mc specified in the links box. the code is:
projectArray = new Array(‘site 1’, ‘site 2’,‘site 3’, ‘site 4’,'site 5)
for (i = 0; i <= projectArray.length; i++){
j += 17
duplicateMovieClip(“but”, ‘but’ + i, i)
eval(“but” + i)._y = j
eval(“but” + i).dis = projectArray*
}
but the scroll bar on teh pane doesnt scroll. is this because it doesnt think it needs to because it hasnt executed this bit of code yet?
if i just put a massive symbol in teh mc, tehn it does scroll fine.

  • liz

Howdy…

I don’t really see anything that might affect the scrollPane component… Can you create a sample and post it here??? And… is your ‘;’ key broken??? :bad:

hi cyan
this is all the code in my movie. this code is placed in the mc thats linked to the scroll pane. its weird. could it be becuaes the mc’s height is dependent on teh code, so the scroll pane calls the mc which is loaded into teh scroll pane, but then the code is called which populates the mc? well, i dont know, i’ll just have to find another way.
cheers.

  • D
    ps
    no, my ; key is not bust! i’m just too lazy to stick them on the end of each line. (lazy bugger arent I!?)C:-)

Well… The sample file would be great to solve your problem, but if you can’t, you can’t…

Two things that I see in your code…
projectArray = new Array(‘site 1’, ‘site 2’,‘site 3’, ‘site 4’,'site 5)
You are missing closing ’ at the end of site 5… Better yet, change all ’ to "…
duplicateMovieClip(“but”, ‘but’ + i, i)
Change ’ to " here too…
And do refresh the scrollpane at the end of your code…

Best I can do I guess… :rambo:

refresh the scrollpane at the end of my code eh? well, that might just do it! i’ll go and have a play with that, thanks!

  • liz D
    ps
    yes, the code is probably missing a few colons etc… in the original code the array is populated with an xml file which takes up stacks of code, so i quickly deleted all the bumf that didnt need to be there and just hardcoded the array you see. (i’ve also tried this code and had the same results.)

okay, the scrol pane is getting refreshed after the pane mc has been populated, that works fine…
BUT…
this movie is being loaded into my main movie timeline as an external swf, and NO SCROLLBAR! i’ve tried refreshing the pane again in the main time line, but no joy. christ, no wonder they call it the scroll pain component!

  • Liz:hair:

Um… So, you got your movie working fine on its own, but it doesn’t do the job when it is loaded into your main movie file??? Sounds like pathing problem then… Change all of _root to _level0 or sort to see if that makes it working…

hi cyan,
sick to bloody death of this. yes, its probably a path problem, but to hell with it. i’m gonna hard code it all and to hell with the consequences, i’m running out of time. i liked the refresh pane code though, one to remember for the future! I’ve used this in another part of the site with a pane thats less problematical!

  • L

Yup… Gotta do what you gotta do to get things done by the deadline… :wink: