Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > Extensions and Plugins > Components

Reply
 
Thread Tools Rate Thread Display Modes
Old 02-17-2009, 06:50 PM   #1
sholton311
Registered User
 
Join Date: Dec 2008
Posts: 4
Default [AS3] ScrollPane won't update

If someone could be so kind as to tell me why my scrollPane will not display a scroll bar, I'd appreciate it. I feel like I've tried everything....

Here's my code:

ActionScript Code:
import fl.transitions.easing.*; import fl.transitions.Tween; stage.scaleMode = "noScale"; stage.align = "TL"; //top left. var all_thumbs:MovieClip = new MovieClip(); addChild(all_thumbs); var mainPicArea:MovieClip = new MovieClip(); addChild(mainPicArea); galleryPane.source = all_thumbs; var fadeIn:Tween; var picturePathList:Array = []; var thumbPathList:Array = []; var pictureTitleList:Array = []; var pictureDescList:Array = []; var totalPics:Number; var mainPicPlacementX:Number; var mainPicPlacementY:Number = 20; var c:Number = 0; var xs:Number = 0; var ys:Number = 0; var xSpacing:Number = 100; var ySpacing:Number = 10; var thumbRowCount:Number; /*Loading XML*/ var xmlURLLoader:URLLoader = new URLLoader(); var xmlURLRequest:URLRequest = new URLRequest("gallery.xml"); xmlURLLoader.load(xmlURLRequest); xmlURLLoader.addEventListener(Event.COMPLETE, sortXML); function sortXML(event:Event):void {     var xmlData:XML = new XML( xmlURLLoader.data );     var a:Number = xmlData.picture_path.length();     totalPics = a;     var b:Number = 0;     while (b < a) {         picturePathList.push( xmlData.picture_path[ b ] );         thumbPathList.push( xmlData.thumb_path[ b ] );         pictureTitleList.push( xmlData.picture_title[ b ]);         pictureDescList.push( xmlData.picture_desc[ b ]);         b = b + 1;     }     var mainLoader:Loader = new Loader();     var mainRequest:URLRequest = new URLRequest( picturePathList[0] );     mainLoader.load(mainRequest);     mainLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, mainLoaded);     function mainLoaded(event:Event):void {         mainPicPlacementX = (stage.stageWidth/2) - (mainLoader.width/2);         mainPicArea.x = mainPicPlacementX;         mainPicArea.y = mainPicPlacementY;         fadeIn = new Tween(mainPicArea, "alpha", None.easeNone, 0, 1, 1, true);         mainPicArea.addChild(mainLoader);         picTitleBox.text = pictureTitleList[0];         picDescBox.text = pictureDescList[0];         picTitleBox.width = mainPicArea.width;         picDescBox.width = mainPicArea.width;         picTitleBox.x = mainPicArea.x;         picTitleBox.y = mainPicArea.y + mainPicArea.height;         picDescBox.x = mainPicArea.x;         picDescBox.y = mainPicArea.y + mainPicArea.height + 10;     }     loadTheThumbs(); } function loadTheThumbs() {     var thumbLoader:Loader = new Loader();     var thumbRequest:URLRequest = new URLRequest( thumbPathList[ c ]);     thumbLoader.load(thumbRequest);     thumbLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, whenThumbsLoad);     function whenThumbsLoad(event:Event):void {         var thisThumbsLink:String = picturePathList[ c ];         var thisPicsTitle:String = pictureTitleList[ c ];         var thisPicsDesc:String = pictureDescList[ c ];         thumbLoader.x = (xs * xSpacing);         thumbLoader.y = (ys * ySpacing);         xs = xs + 1;         if (xs == thumbRowCount) {             xs = 0;             ys = ys + 1;         }             thumbLoader.addEventListener(MouseEvent.CLICK, loadMainPic );             function loadMainPic(event:MouseEvent):void {                 thumbLoader.removeEventListener(MouseEvent.CLICK, loadMainPic );                 if (mainPicArea.numChildren == 1) {                     mainPicArea.removeChildAt(0);                 }                 picDescBox.text = "";                 picTitleBox.text = "";                                 var mainLoader:Loader = new Loader();                 var mainRequest:URLRequest = new URLRequest (  thisThumbsLink  );                 mainLoader.load( mainRequest );                                 mainLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, mainLoaded);                 function mainLoaded(event:Event):void {                     thumbLoader.addEventListener(MouseEvent.CLICK, loadMainPic );                                         mainPicPlacementX = (stage.stageWidth / 2) - (mainLoader.width / 2 );                     mainPicArea.x = mainPicPlacementX;                     mainPicArea.y = mainPicPlacementY;                     mainPicArea.addChild( mainLoader);                     fadeIn = new Tween( mainPicArea, "alpha", None.easeNone , 0, 1, 30, false);                     picTitleBox.text = thisPicsTitle;                     picDescBox.text = thisPicsDesc;                     picTitleBox.x = mainPicArea.x;                     picDescBox.x = mainPicArea.x;                     picTitleBox.y = mainPicArea.y + mainPicArea.height + 5;                     picDescBox.y = mainPicArea.y + mainPicArea.height + 20;                     picTitleBox.width =  mainPicArea.width;                     picDescBox.width =  mainPicArea.width;                 }// end mainLoaded             }// end loadMainPic         }         all_thumbs.addChild(thumbLoader);     c = c + 1;         if ( c < totalPics ) {         galleryPane.update();         loadTheThumbs();             } else {         galleryPane.update();         xs = 0;         ys = 0;         c = 0;     } }
sholton311 is offline   Reply With Quote
Old 02-17-2009, 08:52 PM   #2
tarafenton
Tara Fenton
 
Join Date: May 2005
Location: Brooklyn, NY USA
Posts: 346
Send a message via AIM to tarafenton
Default

did you try
ActionScript Code:
galleryPane.content.update();
tarafenton is offline   Reply With Quote
Reply


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
[AS3] TextFields Randomly Disappearing from My ScrollPane JMAndr Components 3 02-03-2009 08:18 AM
[AS3] ScrollPane Sizing Problem JMAndr Components 1 01-20-2009 11:51 AM
[AS3] "Stopped drag" event for scrollPane tohihaho Components 0 12-03-2008 03:14 PM
[AS3] ScrollPane problems JoshR35 Components 4 11-12-2008 04:49 PM
[AS3] ScrollPane not showing scrollbars dynamically mrjackinc Components 1 07-08-2008 01:11 PM


All times are GMT. The time now is 10:07 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.