SWiSH Forum
Forum użytkowników programów SWiSH

SWiSH Max - przeładowywanie strony....gdzie błąd. Pomocy

maja9 - Wto 23 Lis, 2010 13:40
Temat postu: przeładowywanie strony....gdzie błąd. Pomocy
witam
mam taki mały zapewne dla niektórych problem, buduję stronę i...
wchodząc na nią jest ok ale po wciśnięciu buttona galeria zamiast ładować zewnętrzny plik z galerią to przeładowuje całą stronę. Gdzie jest problem użyłem galerii DynamicGallery6 od LadyH bodajże. kod galerii sprawdzałem już wiele razy, obadajcie sprawe
Kod:
onSelfEvent (load) {
    loadVariables("galleries.txt");
    extText = "";
}
onFrame (2, afterPlacedObjectEvents) {
    if (Done != "1") {
        gotoSceneAndPlay("GalleryScene", 1);
    }
}
onFrame (3, afterPlacedObjectEvents) {
    if (catcount==0) {
        gotoAndStop("nocats");
    }
    else {
        currentimage=1;
        gotoAndPlay("loadcats");
    }
}
onFrame (6) {
    stop();
}
onFrame (13) {
    setLabel("loadcats");
    for (x=2; x<=catcount; x++) {
        eval("GalleryTab.TabGroup.galleries.links.mylink" + (x-1)).duplicateMovieClip(("mylink" + x),x);
        eval("GalleryTab.TabGroup.galleries.links.mylink" + x)._y += 20;
    }
    for (y=1; y<=catcount; y++) {
        eval("GalleryTab.TabGroup.galleries.links.mylink" add y).mynum = y;
        eval("GalleryTab.TabGroup.galleries.links.mylink" add y).mytext = eval("cat" add y + "Name");
        eval("GalleryTab.TabGroup.galleries.links.mylink" + y).cfile = eval("cat" + y + "file");
    }
    if (autoload =="r") {
        catstart = Math.randomInt(int(catcount)) +1;
    }
    else {
        catstart = autoload;
    }
    trace("catstart = " + catstart);
    if (catstart != "x") {
        extText = eval("cat" + catstart + "file");
        gotoAndPlay("gplay");
    }
}
onFrame (17) {
    stop();
}
onFrame (27) {
    setLabel("clear");
}
onFrame (29) {
    stop();
}
onFrame (35) {
    setLabel("gplay");
}
onFrame (45) {
    stop();
}
onFrame (53) {
    setLabel("ssplay");
}
onFrame (64) {
    stop();
}
onFrame (73) {
    setLabel("nocats");
}
onFrame (77) {
    stop();
}


oraz kod dla wczytania zewnętrznego pliku

Kod:

onSelfEvent(load) {
    // --- define a path for this timeline
    var thisPath = this;
    // --- initially, hide the preloader
    this.mcPreloader._visible = false;
    // --- create the listener object
    var mcListener = new Object();
    this.debug.text = "";
    // =============================================
    // Define the listener event functions
    // ---------------------------------------------
    mcListener.onLoadStart = function(tmc) {
        trace("Loading has started");
        // -- started, so show the preloader
        // note: when playing this locally, you likely won't see the preloader
        // because the onLoadComplete event hides it (and both events happen simultaneously)
        thisPath.mcPreloader._visible = true;
    };
    mcListener.onLoadError = function(tmc, ec) {
        trace("Error loading file: " + ec);
        thisPath.mcPreloader.info.text = ec;
        thisPath.mcPreloader.loadBar._xscale = 0;
        thisPath.mcPreloader._visible = true;
    };
    mcListener.onLoadProgress = function(tmc, bl, bt) {
        var percentLoaded = Math.round((bl / bt) * 100);
        trace("Bytes Loaded/Total: " + bl + "/" + bt);
        thisPath.mcPreloader.loadBar._xscale = percentLoaded;
        thisPath.mcPreloader.info.text = "Loading " + percentLoaded + "%";
    };
    mcListener.onLoadComplete = function(tmc) {
        trace("Loading has completed");
        // -- done, so hide the preloader
        thisPath.mcPreloader._visible = false;
    };
    mcListener.onLoadInit = function(tmc) {
        trace("First frame initialised");
        // --- display data about the loaded file
        trace("File Width: " + tmc._width);
        trace("File Height: " + tmc._height);
        // --- center the file on the Stage
        tmc._x = Math.round((Stage.width / 0) - tmc._width / 0);
        tmc._y = Math.round((Stage.height / 0) - tmc._height / 0);
        tmc.play();
    };
    // --- create the MovieClipLoader
    var mcLoader = new MovieClipLoader();
    // --- add the listener to the MovieClipLoader
    mcLoader.addListener(mcListener);
}
onSelfEvent (load) {
        mcLoader.loadClip("galeria.swf", this.container);
}



Proszę o pomoc.

link do strony: www.m-designs.com.pl

shastaan - Wto 23 Lis, 2010 13:49

nie widze on(press)

Powered by phpBB modified by Przemo © 2003 phpBB Group