Why is the thumbnail images placed in different order than the xml?

Hi all!
This same code I have asked about before, and got excelent help, but this is a different problem so I just start a new thread.
This is a code that open a XML file, containing a small list of images, and place them as thumbs on the page.
It kinda work now, but the funny thing is, the order of the thumbs is totally scrambled compared to the xml list, and I can't just see why!
It has something to do whith when the loaders gets transfered via addEventListener to the placePics function, more than that I cant find out!
There may be the better way to put up this code. I just feel putting it up in two nested addEventListeners like this is not the best of practice. But I see no other way here...
package {
     import flash.display.*;
      import flash.events.*;
      import flash.net.*;
      public class thumbHolder extends MovieClip {
            var xmlRequest:URLRequest;
            var xmlLoader:URLLoader;
            var imgData:XML;
            var numberOfChildren:Number;
            var currentImgNum:Number;
            var imgLoader:Loader;
            var imgContainer:Array = [];
            var currentImg:String;
            public function thumbHolder() {
                  currentImgNum = 0;
                  xmlRequest = new URLRequest("images.xml");
                  xmlLoader = new URLLoader(xmlRequest);
                  xmlLoader.addEventListener(Event.COMPLETE, handlePics);
            public function handlePics(e:Event):void {
                  imgData = new XML(e.target.data);
                  numberOfChildren = imgData.*.length();
                  for (var i:int = 0 ; i < numberOfChildren ; i++) {
                       currentImg = imgData.image[i].imgURL;
                       imgLoader = new Loader;
                       imgLoader.load(new URLRequest(currentImg));
                       imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, placePics);
          function placePics(e:Event):void {
                 var oldH:Number = e.target.loader.height;
                 var oldW:Number = e.target.loader.width;
                 e.target.loader.height = 100;
                 var prosent:Number = (e.target.loader.height / oldH) * 100;
                 e.target.loader.width = (prosent * oldW) /100;
                 imgContainer.push(e.target.loader);
                 imgContainer[currentImgNum].x = (e.target.loader.width * currentImgNum) + (currentImgNum * 5) + 6;
                 addChild(imgContainer[currentImgNum]);
                 currentImgNum++;

Never mind! I finally managed to see what to do. Thanks for the help
package {
     import flash.display.*;
     import flash.events.*;
     import flash.net.*;
     public class thumbHolder extends MovieClip {
          var xmlRequest:URLRequest;
          var xmlLoader:URLLoader;
          var imgData:XML;
          var numberOfChildren:Number;
          var currentImgNum:Number;
          var imgLoader:Loader;
          var imgContainer:Array = [];
          var currentImg:String;
          public function thumbHolder() {
               currentImgNum = 0;
               xmlRequest = new URLRequest("images.xml");
               xmlLoader = new URLLoader(xmlRequest);
               xmlLoader.addEventListener(Event.COMPLETE, handlePics);
          public function handlePics(e:Event):void {
               imgData = new XML(e.target.data);
               numberOfChildren = imgData.*.length();
               adToArray(currentImgNum);
          private function adToArray(currNum:Number):void {
               currentImg = imgData.image[currNum].imgURL;
               imgLoader = new Loader;
               imgLoader.load(new URLRequest(currentImg));
               imgLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, placePics);
          function placePics(e:Event):void {
               var oldH:Number = e.target.loader.height;
               var oldW:Number = e.target.loader.width;
               e.target.loader.height = 100;
               var prosent:Number = (e.target.loader.height / oldH) * 100;
               e.target.loader.width = (prosent * oldW) /100;
               imgContainer.push(e.target.loader);
               imgContainer[currentImgNum].x = (e.target.loader.width * currentImgNum) + (currentImgNum * 5) + 6;
               addChild(imgContainer[currentImgNum]);
               if (currentImgNum < numberOfChildren) {
                    currentImgNum++;
                    adToArray(currentImgNum);

Similar Messages

  • Is it Possible to move the Dropdown Menu to a different layer than the rest of the menu?

    For design reasons I want the dropdown part of my menu to appear as though it is coming out from underneath the banner of the menu. The best way I can figure to do that is to have the dropdown part of the menu (that occurs on rollover) be placed on a separate layer from the main banner menu. Is this possible? I have tried unlocking everything and moving that part to another layer and haven't been successful. Please help this gal out! Thank you!

    I'm still confused as to how I can do this exactly. I have used the tool tip widget to create my own drop down menus. However, I cannot put the trigger point into a different layer than the layer with the drop down menu. How can I make the actual word "accommodations" into the trigger point for this menu? I tried moving the trigger point from the widget over the Accommodations, but in order for the drop down to come out from under the banner, the trigger is under it as well. I've also tried ungrouping them, but I am not successful. Please give me further detail as to how this works!

  • When I select "open a new tab" the tab opens in a different window than the one I'm using. This is release 11.0, and did not happen in 10.0

    When I select "open a new tab" the tab opens in a different window than the one I'm using. This is release 11.0, and did not happen in 10.0

    Hi,
    Please check if '''Open new windows in a new tab instead''' is enabled in '''Tools''' ('''Alt''' + '''T''') > '''Options''' > '''Tabs'''. [https://support.mozilla.org/en-US/kb/Options%20window%20-%20Tabs%20panel Options > Tabs]. If the problem persists, please also check if this happens in a [https://support.mozilla.org/en-US/kb/Managing-profiles new profile]. If the new profile is okay, you can later [https://support.mozilla.org/en-US/kb/Recovering%20important%20data%20from%20an%20old%20profile?s=profile&r=1&e=sph&as=s copy the needed personal data] from the old profile. Firefox stores your personal data and settings in [http://kb.mozillazine.org/Profile_folder another location (profile folder)] separate from its [http://kb.mozillazine.org/Installation_directory files/folder]. A new profile would have the default Firefox settings ('''Tools''' ('''Alt''' + '''T''') > [https://support.mozilla.org/en-US/kb/Options%20window '''Options'''], and [http://kb.mozillazine.org/About:config about:config] ), and usually would also be empty of any '''Extensions''' and themes ('''Appearance''') in Tools > Add-ons) and their settings. Also, a new profile would have no previous stored website data/settings etc., ('''Tools''' > [https://support.mozilla.org/en-US/kb/Clear%20Recent%20History '''Clear Recent History''']).
    [https://support.mozilla.org/en-US/kb/Profiles?s=profile&r=2&e=sph&as=s Profiles Howto]
    [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder & Files]
    [http://kb.mozillazine.org/About:config_entries about:config Entries]

  • Why does eye dropper Lab show a different value than the Lightness channel?

    Can someone help me understand how the L in Lab color in the eye dropper tool maps to the actual Lab Lightness channel?  Both are on a scale of 0-100, but they clearly show different values.  Here's a video that show what I mean (note that if I completely desaturate the color, I get the same results, it isn't a color thing).

    I cannot read much useful in the OP's video, but I think, the OP is not talking about
    HLS- or HSL-Lightness (not available in PS CS6) or HSB-Brightness, but only about
    CIELab Lightness in two different modes:
    Figure 1:
    Figure 2:
    The area was filled with a gray L=50 a=0 b=0.
    In Figure 1 all channels are selected. The values are correct.
    In Figure 2 only the Lightness channel is selected. The value L=54 is wrong.
    What might be the reason?
    Measurements were always taken inside the area. The RGB-values are the same in both modes.
    Please don't verify this by measuring in these Forum-images. These are PNGs in RGB.
    Please verify by repeating the trial.
    Best regards --Gernot Hoffmann

  • VOB converted to AVI audio files imported to premiere play in different order than the video files

    Hello there,
    I extracted the VOB files from a burned dvd created with Adobe Premiere pro 1.5, I converted the files into AVI files, then I imported it to Premiere CS4. The video sequence on the timeline plays in the correct order but a very fast speed, and the audio sequence plays all the individual clips in a random order, not in the order that they were originally edited in.
    What did I do wrong while importing or converting?
    Elio38

    Hi Elio,
    What program, or utility did you use to convert the .vob files to .avi, and what was your target codec?  I typically use SUPER Converter, which is free and very versatile, to convert program stream .vob files to a useable format that PPCS4 is compatible with. You can also directly import and edit a .vob file from a DVD in PPCS4 by simply changing the file extension to .mpg. However, doing so will eliminate the audio channel from the video clip in PPCS4.
    I was able to recreate what I believe was your issue when I tried converting a .vob file to an .avi file, regardless of what codec I used.  I had no issues what so ever when converting the .vob file to a .mov file using the DV codec, for example.  It could be a bug with PPCS4 because the same .avi file I created with the DV codec played back fine in WMPlayer, and VLC, but played back almost in slow motion in PPCS4.  It might be advantageous for you in the meantime to re-convert the .vob files to .mov files and just choose the standard DV codec.
    Remember, you are trying to edit files that are intended for delivery and that were not originally designed to be edited.  Attempting to edit inter-frame formats such as MPEG-2, MPEG-4, FLV, etc...has caused many a headache and even today, are not the easiest to work with.

  • Why don't my photos appear as they do in iPhoto on my Apple Computer. Even though I specify to sync all Events, Faces, etc. the iPad 2 is missing Faces categories and the Events are in a different order.

    Why don't my photos appear as they do in iPhoto on my Apple Computer. Even though I specify to sync all Events, Faces, etc. the iPad 2 is missing Faces categories and the Events are in a different order.

    1) The best way to relocate the iTunes library folder is to move the entire iTunes folder with all subfolders to the new path, then press and hold down shift as start iTunes and keep holding until prompted to choose a library, then browse to the relocated folder and open the file iTunes Library.itl inside it.
    If you've done something different then provide some more details about what is where and I should be able to help.
    2) Purchases on the device should automatically transfer to a Purchased on <DeviceName> playlist, but it my depend a bit on whether automatic iCloud downloads are enabled. If there is a cloudy link then the transfer might not happen. You can use File > Devices > Transfer Purchases. In iTunes you should also check out iTunes Store > Quick Links > Purchased > Music > Not on this computer.
    3) Backup the device, then immediately restore it. In some cases you need to add a restore as new device into that equation. Obbviously not to be attempted until you're sure all your media is in your library. See Recover your iTunes library from your iPod or iOS device should it be needed.
    4) I believe there is complimentary 1 incident 90-day support with hardware purchases, but no free software support for iTunes itself. AppleCare gets you a different level of support.
    tt2

  • How can I make a link a different color than the other links according to the current page?

    Hello.  I have created a navigation bar.  And I would like to style the links to have the current page link a different color than the other links.  For example, if all of the links have a black background, I would like to have the current page link to have a white background.  The reason that I would like to style them this way is so that the visitor knows what page is being visitied.
    I tried different ways but all of them did not show to make any change to the links.  This is what I have so far.  The links work, but all of them have the same color and background.  When on the home page, I would like to have the home page link to have a white background with black letters.  I would appreciate your advice.
    <head>
    ul {
        list-style-type: none;
        text-align: right;
        padding-top: 10px;
        padding-bottom: 6px;
        padding-right: 10px;
    li {
        display: inline;
    a:link {
        color: #FFF;
        background-color: #000;
        text-align: center;
        padding-top: 8px;
        padding-right: 8px;
        padding-bottom: 8px;
        padding-left: 7px;
        text-decoration: none;
    a:visited {
        color: #FFF;
        background-color: #000;
        text-decoration: none;
    a:hover {
        color: #000;
        background-color: #FFF;
        text-decoration: none;   
    a:active {
        color: #FFF;
        background-color: #000;
        text-decoration: none;   
    a.menu:link {
         color: #000   
         background-color: #FFF;
         text-decoration: none;
    </head>
    <body>
    <div class="navigation">
        <ul>
            <li class="menu"><a href="index.html" target="_self">HOME</a></li>
    </body>
    Thank you very much.

    http://www.itworld.com/development/351097/setting-active-menu-item-based-current-url-jquer y

  • Why is the Spry image slideshow not showing all of the thumbnails?

    Hi, I have a problem with the Spry image slideshow with filmstrip.  I downloaded it and inserted all of my pictures and thumbnails.  When I load it up in Firefox and IE seems to work perfectly.
    However when one scrolls through the images, some of the thumbnails are not displaying.  Also, sometimes some of the images won´t display at all. I have double checked the files and they are
    all the correct size (100x100 for the thumbnails) and they are all available in the proper slideshow folder on my webpage.  I am at a loss as to what the problem is, since it works fine for the other
    images. Here is a link to the site:
    http://priental-solar.de/referenzen.htm
    Any help would be greatly appreciated.  Thanks

    All working OK here. All thumbnails and fullsize images appear OK.

  • How do I set the thumbnail image of my videos that export to my computer?  I'm using Premiere Elements 11 on a windows 8.1 PC 64bit.

    How do I set the thumbnail image of my videos that export to my computer?  I'm using Premiere Elements 11 on a windows 8.1 PC 64bit.
    Or how does Premiere 11 determine where to set the image for the video it is exporting? 
    I already know how to use Freeze frame and save the image to my computer by Publish+Share/Computer/ Immage.
    Thanks,
    Mike

    Mike
    This is not Adobe. Rather user to user. We are all visitors here.
    Just a bit of history....back in the days of Premiere Elements 4, you could set a "poster frame" in what was called the Project area. You did this by right clicking a blank area there and, from the drop down menu that appeared, selecting View/Preview Area, and using the poster frame feature there.
    As I said, when a video imports into Premiere Elements, the thumbnail of the import has been presenting as the first frame of the video. With this Preview area "poster frame" option, you could set the video's thumbnail in the Project area so that the first frame was another frame in the video. But, this "perk" was restricted to thumbnails of the video in Project area.
    If you exported to file with the first frame modified video, the export's thumbnail in Windows Explorer would present with other than the real first frame or the poster frame as the first frame.
    Also, in more recent versions, I have observed that the export to file does not display the real first frame of the video in Windows Explorer. Seems random, but I have not kept track.
    And, remember, at the onset I wrote
    As far as I have ever seen, Premiere Elements Windows uses the first frame of the video for its thumbnail in the program.
    I know of no way within Premiere Elements to control what the program opts to do in this matter. In some compatibility
    issues, it opts to give no image but a generic one.
    I did not say that you can expect to have the Premiere Elements' export file's thumbnail in Windows displaying with its real first frame. And, the more you get into this, depending on the versions, more details need to be added to my comment about "...first frame of video for its thumbnail in the program..."
    I would have to look into all this further to get perspective on the contributing factors.
    ATR
    Add On...The Poster Frame feature appeared in versions 4, 7, 8, and 9 by my count.

  • How can I get the picture to show in Photoshop?  The thumbnail image appears in the right side panel but the full image isn't showing at all.

    How can I get the picture to show in Photoshop CS3?  The thumbnail image appears in the right side panel but the full image isn't showing at all.

    What specific information would you need?  The program was working just fine early yesterday morning and than when I came back in the afternoon to edit  some more pictures that is when I wasn't able to see the full image anymore.  It is providing me with all of the editing options as if the picture is there but it is just a blank screen with the thumbnail pic showing in the right panel. 

  • The thumbnail images have disappeared from one of my sequences

    I have 3 sequences open in the timeline and the thumbnail images have disappeared from the clips in one of them. It's very frustrating to work without them, how do I get them back?

    Thanks so much! That actually wasn't it though... The thumbnail display was already set to 'name plus thumbnail' but 'track size' was set to 'custom'. Once I changed 'track size' to 'small' (which is what my other sequences which were displaying thumbnails were set to) the thumbnails reappeared. Yipee!!!!

  • Is there a way to change the automatic optimization of the Thumbnail images in Webgallery?

    Is there a way to change the automatic optimization of the Thumbnail images in webgallery found in Photoshop (CS3 or Photoshop elements-- I have both)?  The thumbnails come out so blurry that it's embarrassing (for an art site). Thanks.

    Thanks for your response. Your websites look great!  You are to be complimented on your fine design work.
    I've been doing custom sized thumbnails, at around 300px, but they are still a little blurry, like when JPEGs are over optimized and some isolated areas look like they are churning, one shape melting into another like boiling water.  Then, I tried even larger thumbnails, and then shrunk them to a smaller size using HTML commands, hoping  that shrinking them smaller would help tighten up the blurry churning areas. They looked a little better, but the churning areas remained.  When I open up the individual thumbnails in Photoshop and I try using the unsharp mask or the sharpen function, it gets even worse.

  • Facebook recommend button: way to set the thumbnail image that appears in FB newsfeed?

    I've successfully added a Facebook recommend button to a page on my website. It works, and shows up in my FB newsfeed when I click the button. However, the thumbnail image of the webpage that shows up is a cropped little piece of the webpage- you cant tell what it is and it looks awful.

    We have a pre-built Facebook Previews Widget over at MuseThemes.com that achieves this. Simply drag the widget out onto your page, and enter in your page description, title, category and link up an image. There's a complete training video included so you don't get stuck
    Check out the widget here
    Hope this helps! Cheers.
    Steve Harris
    MuseThemes.com

  • Getting the thumbnail images to pop out

    I'm using an AS3 photoviewer from <
    http://www.blog.noponies.com/archives/16>
    and I am trying to get the thumbnail images to pop out when rolled
    over.
    Can someone help me out or point me in the right direction.
    Please upload any modified zips or code here!

    Hi. I did a quick google on AS3 scale up, and yes that is the
    type of effect I would like.
    Like the scale effect on <
    http://www.flashmagazine.com/tutorials/detail/as3_photo_gallery/>,
    to go with the gallery I am using from <
    http://www.blog.noponies.com/archives/16>.
    Please help me or accordingly modify my file at <
    http://www.montreal2losangeles.com/pleasehelpscalethumbs.html>.
    Much appreciation and thanks in advance.

  • Why are ACR PSD files 10-20 percent larger than the same file resaved in PSD?

    Why are ACR > PSD files 10-20 percent larger than the same file resaved in PSD? I posted this many years ago and never found an answer. Now that my drives fill up quicker, I thought I might chase this question a little bit further.
    Same .CR2 saved within ACR either with cmd-R or open ACR within PSD, the saved file is 34.5mb. Resave that same file (no edits) within PSD either with or without Max-compatible and the file is now 30.7mb. Another file that is 24.5 becomes 19.5MB.
    Why the difference? Is ACR and PSD actually using different compression strategies?
    thanks.
    Mac 10.8.5 / CC / ACR 8.4.1 - but this has been a consistent behavior over many years and versions, CS6 / CC.
    Same .CR2 saved within ACR either with cmd-R or open ACR within PSD, the saved file is 34.5mb. Resave that same file (no edits) within PSD either with or without Max-compatible and the file is now 30.7mb. Another file that is 24.5 becomes 19.5MB.

    Hi Jeff
    If it is RLE it's not as efficient as LZW:
    Saved ACR>PSD = 40.1MB  (sample image this AM)
    opened in PS and resaved as PSD = 30.8MB
    resaved as TIF without LZW = 40.1MB    (this adds to your thought that the ACR>PSD doesn't us any compression)
    resaved as TIF/LZW = 9.6MB
    Jeff Schewe wrote:
    I really think your priorities are a bit off. 10-20% is meaningless...you just need to get bigger....  and quit fussing over a few GB's here or there...
    ???   I hope that the Adobe engineers are fussing over 10-20% efficiencies.
    I'm within arms reach to a rack of 40TB of drives (doesn't include off-site drives), and all 2TB drives are being recycled to 4TB drives, as a result the rack is always growing. Actually the ACR>PSD files don't really make a difference in our long term storage, only for the nightly backups. But anyway, how you save, what you save etc. should all be part of the discussion.
    .... so in my case, throw in an excess MB here and there and all of a sudden you are talking TB's. Plus advantages in backup times, drive life, and energy use.
    Somebody added compression into the PS>PSD format, but it wasn't included in the ACR>PSD format, was it a decision or an oversight? If it's just a matter of making ACR compatible with PS when saving the same PSD format..... then why not?
    regards,
    j

Maybe you are looking for

  • If like condition in rtf (template for oracle report)

    i'm begineer developer in oracle ebs i'm using report builder and rtf (xml) template to build report can anyone help my i want to make 2 layout in 1 template (1 rtf file) and give condition with if, lower and like (in sql i'm use like) but is error i

  • Hi,   I just bought a linksys WRT54G Wireless Router. My...

    Hi, I just bought a linksys WRT54G Wireless Router. My laptop was able to detect it wirelessly untill I changing the "Router Name" in the setup page(http://192.168.1.1) While saving the settings, the wireless network suddently disconnected. From that

  • How to hide the unit in the query?

    Hi Gurus, I have three key figures, 1, Stock: Showed as 1000 TON 2, Value: Showed as 100000 USD 3, AVG: Showed as 100 USD/TON, the formula is Value / Stock In the query, the value will display the unit, TON and USD and USD/TON. How can I hide the uni

  • Adding Graphics2D to swing

    Hi, I have a few classes / threads that take and write to a graphics2d object. I want to be able to stick a graphics2d object in a swing gui then pass it to these objects and let them do their work. However, everything I find doesn't say I can't do i

  • Picture is not clearing up???

    My iPhone 5 is not clearing up the pictures at my camera roll... I have restarted the phone 2 times:((( still not working. Help?