Pagina 1 di 2 1 2 ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 11

Discussione: preload suoni

  1. #1

    preload suoni

    ciao a tutti
    Ho messo questo codice per fare il preload di un filmato esterno con suono:
    onClipEvent (load) {
    _root.stop();
    barra2._visible = false;
    testo1 = "caricamento filmato";
    main = true;
    }
    onClipEvent (enterFrame) {
    if (main) {
    car = _root.getBytesLoaded();
    tot = _root.getBytesTotal();
    perc = parseInt((car/tot)*100);
    percent1 = perc+"%";
    barra1._xscale = perc;
    if (car == tot) {
    loadMovieNum("suono1.swf", 1);
    main = false;
    Sound = true;
    barra2._visible = true;
    testo2 = "caricamento musica";
    }
    }
    if (sound) {
    car = _level1.getBytesLoaded();
    tot = _level1.getBytesTotal();
    perc = parseInt((car/tot)*100);
    if (car != undefined) {
    percent2 = perc+"%";
    barra2._xscale = perc;
    if (car == tot) {
    _level1.musica.start(0, 999);
    _root.nextFrame();
    }
    }
    }
    }
    funzionava, ma ora ho messo due tracce dentro il filmato e non mi funziona più!
    grazie in anticipo!

  2. #2
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    Nel senso che ne parte una sola?

  3. #3
    non ne parte nessuna

  4. #4
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    Scrivi così:

    codice:
    onClipEvent (load) {
    	_root.stop();
    	barra2._visible = false;
    	testo1 = "caricamento filmato";
    	main = true;
    }
    onClipEvent (enterFrame) {
    	if (main) {
    		car = _root.getBytesLoaded();
    		tot = _root.getBytesTotal();
    		perc = parseInt((car / tot) * 100);
    		percent1 = perc + "%";
    		barra1._xscale = perc;
    		if (car == tot) {
    			loadMovieNum("suono1.swf", 1);
    			main = false;
    			suono = true;
    			barra2._visible = true;
    			testo2 = "caricamento musica";
    		}
    	}
    	if (suono) {
    		car = _level1.getBytesLoaded();
    		tot = _level1.getBytesTotal();
    		perc = parseInt((car / tot) * 100);
    		if (car != undefined) {
    			percent2 = perc + "%";
    			barra2._xscale = perc;
    			if (car == tot) {
    				_level1.musica.start(0, 999);
    				_root.nextFrame();
    			}
    		}
    	}
    }

  5. #5
    niente... non funziona
    Ho messo due tracce con questo codice:
    s = new Sound();
    s.attachSound("tuosuono");
    s.start(0, 99999);


    s = new Sound();
    s.attachSound("tuosuono1");
    s.start(0,99999 );

    poi dei bottoni

    on (release) {
    s.stop();
    if (alt == true) {
    _root.equal.gotoAndPlay(1);
    }
    gotoAndPlay("Sound1");
    }

    grazie ancora

  6. #6
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    codice:
    s1 = new Sound(_root); 
    s1.attachSound("tuosuono"); 
    s1.start(0, 99999); 
    
    
    s2 = new Sound(_root); 
    s2.attachSound("tuosuono1"); 
    s2.start(0,99999 );

  7. #7
    funziona))
    grazie sei sempre gentilissimo e bravissimo))

  8. #8
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    Figurati.. :)

  9. #9
    Ora però mi si accavallano i suoni
    questo è nei bottoni:
    on (release) {
    s.stop();
    if (alt == true) {
    _root.equal.gotoAndPlay(1);
    }
    gotoAndPlay("Sound2");
    }

    per lo stop:
    on (release) {
    s.stop();
    _root.equal.gotoAndStop(2);
    alt = true;
    }

  10. #10
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    I vari pulsanti devono puntare agli opportuni oggetti Sound, cioè s1 e s2.

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.