Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-06-2009, 02:22 AM   #1
Senior Member
Join Date: Feb 2006
Posts: 102
Default [AS2] ScrollPane.invalidate()

I have placed a scrollpane on the main timeline of my movie. I'm calling a movie into it from my library using the Scroll Content parameter field in the Properties panel. The movie that I'm calling in is using _lockroot=true, and is an expanding movie that calls in text from XML with a for() loop. The XML is loading fine and the text field expanding using autosize='left', but the contents of the movie being called in only display within the dimensions of the scrollpane with no scroll bar. I'm using ScrollPane.invalidate() after my for() loop, but it's still not creating the scroll bar. I'm wondering if the _lockroot might be the problem or if anyone has any other suggestions. Also something to consider is that I'm using an MX UI component for the scrollpane in CS3 because I can edit the appearance of the scroll bar. Don't know if this MX in CS3 might be an issue.

Thanks in advance -
sleepydad is offline   Reply With Quote
Old 12-29-2009, 04:16 AM   #2
Registered User
Join Date: Dec 2009
Posts: 3
Default similar problem

I am having a similar problem. i am building a UI for a client, and i am using an XML to build a dynamic gallery. they are wanting to be able to add things to it later, so i am putting a scrollpane in to save on some space, but i can't seem to get the scroll bar to appear. here's the code i have so far.
function callThumbs() {

	container_mc._x = 5;
	container_mc._y = 5;

	var clipLoader = new MovieClipLoader();
	var preloader = new Object();
	var thumbGlowFilter = new GlowFilter(0x000000, .5, 5, 5, 1, 3, false, false);

	for (i=0; i<imageImagesTotal; i++) {
		thumbURL = imageImages[i].attributes.thumb_url;
		var xCount:Number = i-(5*rowNumber);

		imageThumb_mc = container_mc.createEmptyMovieClip(i, container_mc.getNextHighestDepth());
		imageThumb_mc._x = thumb_width*1.25*xCount;
		trace("X position for loop "+i+" is "+imageThumb_mc._x);
		trace("xCount for loop "+i+" is "+xCount);
		imageThumb_mc.filters = [thumbGlowFilter];
		if (imageThumb_mc._x>260) {
			imageThumb_mc._x = 0;
			yPosition = 50*rowNumber;
			trace("Y Position in if "+yPosition);
		imageThumb_mc._y = yPosition;
		preloader.onLoadStart = function(target) {
			target.title_txt.selectable = false;

		preloader.onLoadProgress = function(target, loadedBytes, totalBytes) {
			target.title_txt.text = Math.floor((loadedBytes/totalBytes)*100);

		preloader.onLoadComplete = function(target) {
			target.onRelease = function() {
	if (i == imageImagesTotal) {

some of the code could be superfluous, but i'll clean it up later. i had it working perfectly, but a crash and a stupid me who hadn't saved fixed that. i went in and did everything exactly as i had before, and now it's not working. i have made a few changes, but the trace(_parent._name) in the if statement at the end goes off without a hitch at the very end of my trace outputs and returns the proper instance name for the scroll pane that this code is being loaded into. as far as i know with coding (which i'm not that good with) that should mean that i have the if () {} statement working and in the right place, yet it doesn't put the scrollbar in. i am positive that i have more items than the pane will hold by nearly double. i have tried several locations and ways of calling the .ScrollPane.invalidate(), yet i cannot seem to get it working. i have tried the absolute address of the scrollpane (which is what i believe i had before), i have tried _parent, as well as with and without the ScrollPane. i am completely stumped as to how to get this working again.
adalast is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:15 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.