A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [CS3] XML slideshow help!! ASAP!!

  1. #1
    Junior Member
    Join Date
    Mar 2008
    Posts
    1

    [CS3] XML slideshow help!! ASAP!!

    I am building a slideshow style app.

    The images for the show are dynamically imported via an XML document.

    I need the movie to wait until ALL images are loaded into their respective mc's before going ahead with transitions etc.

    I NEED HELP ASAP! DEADLINE IS TOMMORROW!

    I need it to wait on frame1 of the main movie until all the images are loaded then jump to frame 2

    here is the code (placed on frame1):

    stop();
    var my_xml = new XML();
    my_xml.ignoreWhite=true;
    my_xml.onLoad = function(success){
    if (success){

    var propertyList=my_xml.firstChild.firstChild;
    var property=propertyList.childNodes;

    for(var i=0; i<property.length; i++){

    var id=property[i].childNodes[0].firstChild.nodeValue;
    var hero=property[i].childNodes[1].firstChild.nodeValue;
    var thumb=property[i].childNodes[2].firstChild.nodeValue;
    var image1=property[i].childNodes[3].firstChild.nodeValue;
    var image2=property[i].childNodes[4].firstChild.nodeValue;
    var image3=property[i].childNodes[5].firstChild.nodeValue;
    var logo=property[i].childNodes[6].firstChild.nodeValue;

    var venue = "v"+i;
    var thumbname = "t"+i;

    _root[venue].hero.holder.loadMovie(hero, "_root."+venue+".hero.holder");
    _root.thumbs[thumbname].holder.loadMovie(thumb, "_root.thumbs."+thumbname+".holder");
    _root[venue].logo.holder.loadMovie(logo, "_root."+venue+".logo.holder");
    _root[venue].pol.p1.holder.loadMovie(image1, "_root."+venue+".pol.p1.holder");
    _root[venue].pol.p2.holder.loadMovie(image2, "_root."+venue+".pol.p2.holder");
    _root[venue].pol.p3.holder.loadMovie(image3, "_root."+venue+".pol.p3.holder");

    }
    }

    }
    my_xml.load("HomePage.xml");

  2. #2
    Junior Member
    Join Date
    Oct 2002
    Posts
    20
    Then your issue has very little to do with XML. If it knows what clips to load then it got the data from XML and is proceeding. You could hard code the clip names and it would work the same way. Come up with a way to make it wait a few seconds before proceeding.

  3. #3
    Total Universe Mod jAQUAN's Avatar
    Join Date
    Jul 2000
    Location
    Honolulu
    Posts
    2,429
    You'll need to ditch loadMovie and recursively call loadClip on a MovieClipLoader.
    Don't sweat it, it's easy to change out.

    Check out my post here http://board.flashkit.com/board/show...22#post4024322

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center