Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Flash & XML Question

  • 30-11-2007 11:11AM
    #1
    Registered Users, Registered Users 2 Posts: 467 ✭✭


    Hi,

    I'm currently building a system that displays anywhere from 100 - 800 images in one massive scrolling movieclip in flash.
    It works fine up until about 50 images then the loading time becomes way too long.
    I have an XML file with all the images... lets say 500 for the moment.
    Anyone know a way to load say 20 at a time?


Comments

  • Registered Users, Registered Users 2 Posts: 3,594 ✭✭✭forbairt


    You're trying to load 500 images at once ????

    Are these tiny images or 100kbimages ? or more ... cus you're looking at loading 50mbs+ if they are which in my mind is crazy unless this is a distributed app

    If it was up to me I'd create a small script that would return the xml for 1 - 20 images ... 21 - 40 .. and so on based on a simple value entered into it

    Then you load them only as they are needed ...


  • Registered Users, Registered Users 2 Posts: 467 ✭✭nikimere


    No they are small images, about 8kb each... so that would be less than 5MB.
    I would really like to do all this within flash and not have to create custom XML files.
    Is there a way to take sections the XML childNode load them, then after the 20 have been displayed load the next 20... and so on?


  • Registered Users, Registered Users 2 Posts: 3,594 ✭✭✭forbairt


    are the images embedded into the xml document or are you loading each one individually ?

    You have to load the full XML document I believe in order to parse it with actionscript (thats to the best of my knowledge its been a while since I've played)

    If the images are embedded into the xml doc then you're going to have to load the whole thing.

    Apart from that I don't see the problem ... just iterate through the xmldoc loading the images as you go ?


  • Registered Users, Registered Users 2 Posts: 467 ✭✭nikimere


    forbairt wrote: »
    are the images embedded into the xml document or are you loading each one individually ?

    ...

    Apart from that I don't see the problem ... just iterate through the xmldoc loading the images as you go ?
    The images are loaded individually, all that is in the XML doc is a link to the jpg.
    Suppose i'll just have to do some loops in loops in loops....
    Thought there might have been some nice fancy way i didn't know about :) Thanks anyway


  • Registered Users, Registered Users 2 Posts: 3,594 ✭✭✭forbairt


    Maybe take a look through the code here

    http://sourceforge.net/project/showfiles.php?group_id=177593

    I really think you should pass the xml file through something else ...though as loading 500 - 800 lines is quite an overhead ... once you start to add in descriptions or similar the file is gonna get quite large


  • Advertisement
Advertisement