Need help scrolling dynamic content from XML

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default Need help scrolling dynamic content from XML

    I am trying to make a photo gallery and I have succeed in importing the
    pictures from XML into Flash. There are still two problems:

    1. The content is loading into a movieclip and I tried to place a scroll pane
    on the stage to adding scrolling capabilities. I set the parameters to control
    the movieclip that holds the thumbnails but it is not making a scroll bar. I
    can see the pictures inside of the scroll pane but it will not scroll to show
    the rest of the pictures.

    2. I can not figure out how to space the thumbnails evenly. I made a variable
    and multiplied the x position of each picture by it but there are large
    differences between landscape and portrait pictures.

    Thanks for the help

    myPhoto = new XML();
    myPhoto.ignoreWhite = true;
    myPhoto.load("events.xml");
    myPhoto.onLoad = function(success) {
    numimages = this.firstChild.childNodes.length;
    spacing = 70;
    for (i=0; i<numimages; i++) {
    this.picHolder = this.firstChild.childNodes[i];
    this.thumbHolder = thumbnails.createEmptyMovieClip("thumbnail"+i, i);
    this.thumbHolder._x = i*spacing;
    this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_i mage",
    0);
    this.thumbLoader.loadMovie(this.picHolder.attribut es.thmb);
    this.thumbHolder.title = this.picHolder.attributes.title;
    this.thumbHolder.main = this.picHolder.attributes.main;
    this.thumbHolder.onRelease = function() {
    loader.loadMovie(this.main);
    title_txt.text = this.title;
    };
    }
    };

    antonioStarms Guest

  2. Similar Questions and Discussions

    1. A scrolling content box inside a flash comp
      Hello New to flash - hating it more every passing minute. does anyone know of a way to place a scrolling content box inside another flash...
    2. MX 2004 Pro Dynamic Scrolling text
      Ok, I've looked at almost all the documentation on this scrolling text thing and still nothing works!!!! In my swf I have a textfield that is...
    3. dynamic text scrolling
      Hi, I got some text pulled out of a file using variables and displayed in a dynamic text field which works fine. Is there a way to create a custom...
    4. Scrolling Dynamic text
      I was going through the tutorial in Exploring ... book and thought what if I have more text than the text field can hold? I tried using the...
    5. Dynamic Scrolling Text
      Does anyone know how to create a scrolling banner that displays news dynamically from a DB? Thanks
  3. #2

    Default Re: Need help scrolling dynamic content from XML

    You need to switch from using loadMovie to using the MovieClipLoader object.
    This object has a listener called "onLoadInit" that allows you to get the size
    of your photo when it comes in, but before it appears on stage, so that you can
    adjust its placement. Check out the help docs for info on usage.

    WL

    BrnstormWilly Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139