Hello !

I try to load jpeg pictures that are indexed in a XLM file ( dynamically).
Unfortunately, it seems that the XML is never loaded...

here edittext log and log0 are never updated has it should be according to the 
.onLoad function.

# File header
# -----------

.flash bbox=1200x800 version=7 fps=48 name="cahier.swf" background=white 
compress
    
    .frame 1
        .box fond width=1200 height=800 fill=white
        .edittext log text="log" width=200 height=20 border color=black
        .edittext log0 text="log0" width=200 height=20 border color=black

        .put fond
        .put log0 x=10 y=50
        .put log x=10 y=10
        
        .action:
            //variables
            listePhotos = new Array();

            cahier_XML = new XML();
            cahier_XML.ignoreWhite = true;

            cahier_XML.onLoad = function(success) { 
                this.log0.text += " 2;";

                       if (success) { 
                    this.log0.text += " 3;";

                    cahier = cahier_XML.firstChild;
                    photos = cahier.childNodes; 
                    for (i = 0; photos[i] != undefined; i++) {
                        listePhotos[i] = photos[i].firstChild;
                    }

                    this.log.text += listePhotos[0].toString();
                    this.log0.text += " 4;";
                    this.createEmptyMovieClip("mc",0);
                    mc.loadMovie(listePhotos[0].toString());
                    mc.onEnterFrame=function(){;};
                }else {
                    this.log0.text += " ??? ";
                }
    
            };
        .end

    .frame 2
        .action:
            cahier_XML.load("cahier.xml");
            this.log0.text += " 1;";

            this.stop();
        .end
.end



Thanks for any advice

Cyril
                                          
---------------
SWFTools-common is a self-managed list. To subscribe/unsubscribe, or amend an 
existing subscription, please kindly point your favourite web browser 
at:<http://lists.nongnu.org/mailman/listinfo/swftools-common>

Reply via email to