Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Flash & XML Question

  • 30-11-2007 10: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