Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-21-2005, 06:56 PM   #1
Registered User
Join Date: Apr 2005
Posts: 12
Default scrollPane depth issues: content pops out

I've got a scroll pane loading another swf which is loading some dynamic content. Every once in a while, the content jumps up a few levels out of the scrollPane. The scroll bars still show up, everything works, it's just on top of the frame of the scrollPane.

Here is my code. One variable is passed in which is "pid". If you'd like to try the script you can use pid=164; for reference. I don't think that my problem lies within this code though, I think it's just a buggy scrollPane component.

Thanks in advance for your help. I'll post up some links to fla's if anybody wants them.

To see my problem in action: Mickey Mantle Autographs Use the menu on the right side to navigate to: Mickey Mantle>Photographs. This is the point where my scrollPane will get messed up. It may take 10 or so times of clicking on the Photographs button to get the content to jump out.

ActionScript Code:
var loaderCounter:Number = 0; var products_xml = new XML(); var thumbPath:String = ""; var description:String = ""; var xmlUrl:String = "http://www.mickeymantleautographs.com/page.php?pid="+pid; var yPosition:Number = 10; var my_fmtPROD:TextFormat = new TextFormat(); my_fmtPROD.font = "CenturyGothic"; my_fmtPROD.size = 16; var my_fmtPRODDesc:TextFormat = new TextFormat(); my_fmtPRODDesc.font = "CenturyGothic"; my_fmtPRODDesc.size = 14; products_xml.ignoreWhite = true; products_xml.load(xmlUrl); this.createEmptyMovieClip("products_mc", 0); products_xml.onLoad = function(success:Boolean) {     for (var n = 0; n<products_xml.firstChild.childNodes.length; n++) {         products_mc.createEmptyMovieClip("products_mc"+loaderCounter, products_mc.getNextHighestDepth());                 thumbPath = products_xml.firstChild.childNodes[loaderCounter].attributes.Picture;         prod_title = products_xml.firstChild.childNodes[loaderCounter].attributes.Title;         prod_desc = products_xml.firstChild.childNodes[loaderCounter].firstChild.nodeValue;                 products_mc["products_mc"+loaderCounter].createEmptyMovieClip("productThumb_mc"+loaderCounter, products_mc["products_mc"+loaderCounter].getNextHighestDepth());         products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter].createEmptyMovieClip("thumbHolder_mc"+loaderCounter, products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter].getNextHighestDepth());         products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter]["thumbHolder_mc"+loaderCounter].loadMovie(thumbPath);         products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter]._x = 10;         products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter]._y = yPosition;         products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter]["thumbHolder_mc"+loaderCounter]._xscale = 100;         products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter]["thumbHolder_mc"+loaderCounter]._yscale = 100;                 products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter].onPress = function() {             getProd(products_xml.firstChild.childNodes[this._name.charAt(15)].attributes.pID, pid);         };                 products_mc["products_mc"+loaderCounter]["productThumb_mc"+loaderCounter].addEventListener("complete", listenerObject);                 products_mc["products_mc"+loaderCounter].createTextField("producttitle_txt"+loaderCounter, products_mc["products_mc"+loaderCounter].getNextHighestDepth(), 170, yPosition, 380, 150);         products_mc["products_mc"+loaderCounter]["producttitle_txt"+loaderCounter].wordWrap = true;         products_mc["products_mc"+loaderCounter]["producttitle_txt"+loaderCounter].embedFonts = true;         products_mc["products_mc"+loaderCounter]["producttitle_txt"+loaderCounter].text = prod_title;         products_mc["products_mc"+loaderCounter]["producttitle_txt"+loaderCounter].setTextFormat(my_fmtPROD);                 products_mc["products_mc"+loaderCounter].createTextField("productDesc_txt"+loaderCounter, products_mc["products_mc"+loaderCounter].getNextHighestDepth(), 170, yPosition+18, 380, 150);         products_mc["products_mc"+loaderCounter]["productDesc_txt"+loaderCounter].wordWrap = true;         products_mc["products_mc"+loaderCounter]["productDesc_txt"+loaderCounter].embedFonts = true;         products_mc["products_mc"+loaderCounter]["productDesc_txt"+loaderCounter].text = prod_desc;         products_mc["products_mc"+loaderCounter]["productDesc_txt"+loaderCounter].setTextFormat(my_fmtPRODDesc);                 loaderCounter = loaderCounter+1;                 yPosition = yPosition+160;     }     fixPane(); };
miiek is offline   Reply With Quote
Old 04-21-2005, 10:24 PM   #2
Registered User
Join Date: Apr 2005
Posts: 12

i've tried setting the size of the scrollpane after the content was finished loading. this isn't helping.
miiek is offline   Reply With Quote
Old 04-23-2005, 09:27 AM   #3
Registered User
Join Date: Nov 2004
Location: sirolo (AN) - italy
Posts: 24
Default Same problem, I am trying ...

I have same problem as you have on my project. I believe this may help: http://www.actionscript.org/forums/s...llpane+dynamic

I am trying to do something as described in that thread, assuring that all my content is definetely loaded in my contentHolder before refreshing scrollpane with refreshPane();

I will keep you informed if it will work...
ulisse 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:46 PM.

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.