Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    [MX] Preload img esterne che non convince..

    sera, sempre io..

    Vorrei un parere su questo loadImage su file.txt di tre immagini esterne jpg ! qualcosa non quadra.. è piuttosto strano che quando deve visualizzare la percent % di caricamento sul server non è così brillante come in test..

    E' un pò che lo sto osservando..
    ecco il code AS
    codice:
    // Dimensione dello Stage
    StageLarg = 550;
    StageAlt = 400;
    function caricaFoto() {
    	_root.menu.iconpopup.xml_image.imgEsterne.loadMovie("images/image_"+vediFoto+".jpg");
    	a = setInterval(preloadFOTO, 50);
    	perc = 0;
    }
    function preloadFOTO() {
    	car = _root.menu.iconpopup.xml_image.imgEsterne.getBytesLoaded();
    	tot = _root.menu.iconpopup.xml_image.imgEsterne.getBytesTotal();
    	perc = Math.round((car*100)/tot);
    	loading.text = "Loading.. " + perc + "%";
    	if (car>1024) {
    		if (car == tot && _root.menu.iconpopup.xml_image.imgEsterne._width > 0) {
    			imgEsterne._x = 5;
    			imgEsterne._y = 5;
    			loading.text = "";
    			clearInterval(a);
    			b = setInterval(alfaPiu,50);
    		}
    	}
    }
    this.createEmptyMovieClip("imgEsterne", 1);
    imgEsterne._alpha = 0;
    mc = eval(imgEsterne);
    dati = new LoadVars();
    dati.load("txt/totfoto.txt");
    dati.onLoad = function() {
    	totFoto = this.totalefoto;
    	vediFoto = 1;
    	caricaFoto();
    };
    grazie,
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  2. #2


    ri..ri.. UppeTe
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  3. #3
    :master: uppettaggio..
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  4. #4
    non mi si testa nemmeno con doppio Ctrl+Invio :master:

    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  5. #5
    ovviamente quando lo testo in flash, tolgo i percorsi che oraa vedete dopo _root.ecc..

    è la parte della percent % che non mi convince!
    anche se metto tutto a solo _root.imgEsterne.ecc..
    non riesco a visualizzare la percentuale durante il test! :master:

    nessuno è..
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

  6. #6
    qualcuno può buttarci almeno l' okkio ?

    non riesco a visualizzare la percentuale.. nel campo di testo dinamico! le font sono caricate. :master: grazie a tutti
    ultima versione:
    codice:
    StageLarg = 550;
    StageAlt = 400;
    function caricaFoto() {
    	imgEsterne.loadMovie("images/image_"+vediFoto+".jpg");
    	a = setInterval(preloadFOTO, 50);
    	perc = 0;
    }
    function preloadFOTO() { 
    car = imgEsterne.getBytesLoaded(); 
    tot = imgEsterne.getBytesTotal(); 
    perc = Math.round((car/tot)*100); 
    testo.text = "Loading.."+ perc +" %"; 
    if (car == tot && imgEsterne._url != _root.url) { 
    clearInterval(a); 
    testo.text = "";
    imgEsterne._x = 5;
    imgEsterne._y = 5;
    imgEsterne._alpha = 100;
    clearInterval(a);
    b = setInterval(alfaPiu,50);
    } 
    }
    
     
    this.createEmptyMovieClip("imgEsterne", 1);
    imgEsterne._alpha = 0;
    mc = eval(imgEsterne);
    dati = new LoadVars();
    dati.load("txt/totfoto.txt");
    dati.onLoad = function() {
    	totFoto = this.totalefoto;
    	vediFoto = 1;
    	caricaFoto();
    };
    
    k = 0 
    if(k!=undefined){ 
    trace("ok") 
    }
    Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
    Mechanics & Expert Tuning Fix Z3 Roadster Community

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.