Thumnails wont load inside Scrollpane.HELP

  • coolbox
  • Born
  • Born
  • User avatar
  • Posts: 1
  • Loc: Paris

Post 3+ Months Ago

Hey guys having a massive issue with a Scrollpane in Actionscript. Just wondering if someone wouldnt mind having a look for me please. I have been working on this for 5 days now with no luck.

Here is the code:

Code: [ Select ]
menuXml = new XML();
menuXml.ignoreWhite = true;
menuXml.onLoad = function(success) {
    if (success) {
        var menuItem = this.firstChild.childNodes;
        thumbScroller.createEmptyMovieClip("thumbContainer",0);
        for (var i=0; i<menuItem.length; i++) {
            
            currentThumb = thumbScroller.thumbContainer.attachMovie("thumbClip", "thumbClip" + i, i);
            

            var currentThumb_mc = thumbScroller.createEmptyMovieClip("thumbnail_mc"+i,i);
            currentThumb_mc._y = i * 160;
            currentThumb_mc._x = 20;
            
            currentThumb_mc.createEmptyMovieClip("thumbClip",0);
            currentThumb_mc.thumbClip.loadMovie(menuItem[i].attributes.thumb);
                    
            }
                
        }
    
}
menuXml.load("myContent.xml");
  1. menuXml = new XML();
  2. menuXml.ignoreWhite = true;
  3. menuXml.onLoad = function(success) {
  4.     if (success) {
  5.         var menuItem = this.firstChild.childNodes;
  6.         thumbScroller.createEmptyMovieClip("thumbContainer",0);
  7.         for (var i=0; i<menuItem.length; i++) {
  8.             
  9.             currentThumb = thumbScroller.thumbContainer.attachMovie("thumbClip", "thumbClip" + i, i);
  10.             
  11.             var currentThumb_mc = thumbScroller.createEmptyMovieClip("thumbnail_mc"+i,i);
  12.             currentThumb_mc._y = i * 160;
  13.             currentThumb_mc._x = 20;
  14.             
  15.             currentThumb_mc.createEmptyMovieClip("thumbClip",0);
  16.             currentThumb_mc.thumbClip.loadMovie(menuItem[i].attributes.thumb);
  17.                     
  18.             }
  19.                 
  20.         }
  21.     
  22. }
  23. menuXml.load("myContent.xml");


Basically the problem is that the thumbnails i am pulling from my XML file wont sit within the Scrollpane but appear to sit on top of it, overlapping the pane itself.

If anyone can help then i can perhaps forward the XML, jpg's and FLA via private email.

Cheers in advance for your help.

Pete
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • graphixboy
  • Control + Z
  • Mastermind
  • User avatar
  • Posts: 1828
  • Loc: In the Great White North

Post 3+ Months Ago

I may be wrong but I don't think you can load images into a scroll pane using straight xml. I don't think the scroll pane itself works like a normal movieclip that you can easily place other clips inside.

I would create an empty movieclip, load all your images and then add a custom scroll bar if its to large.

scroll bar tutorial http://www.kirupa.com/developer/flash8/scrollbar.htm

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.