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

    preload effetto accellerazione

    ciao ragazzi, vorrei realizzare un preload con la statusbar che si muove con effetto accellerato o decellerato tanto per intenderci
    come su questo sito www.gaiamobili.com
    il code che uso io è questo:

    if (_framesloaded>0 && _framesloaded == _totalframes) {
    gotoAndPlay("Scena 1", 1);
    } else {
    if (_root.getBytesLoaded() == _root.getBytesTotal()) {
    _root.nextFrame();
    }
    _visible = true;
    perc = barra._xscale=Math.round((_root.getBytesLoaded()/_root.getBytesTotal())*100);
    percentuale = perc;
    numero._x = barra._x+barra._width;
    }
    GOOD LIFE***

  2. #2
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    Al movieclip della barra associ lo script:
    codice:
    onClipEvent(enterFrame){
    	this._xscale += (this.endScale - this._xscale) / 5;
    }
    e cambi il codice del preloader in:
    codice:
    if (_framesloaded > 0 && _framesloaded == _totalframes) {
    	gotoAndPlay("Scena 1", 1);
    } else {
    	if (_root.getBytesLoaded() == _root.getBytesTotal()) {
    		_root.nextFrame();
    	}
    	_visible = true;
    	perc = barra.endScale = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
    	percentuale = perc;
    	numero._x = barra._x + barra._width;
    }

  3. #3
    grazie NEGATIVE lo provo subito grazie mille ancora ciao!!!
    GOOD LIFE***

  4. #4
    grazie NEGATYVE "scusa per l'orto orrore ma ho scritto veloce"
    funziona ok!
    scusa se sono rompi co.....i ma come faccio a togliere quell'effetto
    che c'è all'inizio che da 100% passa a zero e poi parte il loading?
    ciao e grazie ancora!
    GOOD LIFE***

  5. #5
    Utente di HTML.it L'avatar di negatyve
    Registrato dal
    Feb 2001
    Messaggi
    9,479
    codice:
    onClipEvent(load){
    	this._xscale = this._yscale = this.endScale = 1;
    }
    onClipEvent(enterFrame){
    	this._xscale += (this.endScale - this._xscale) / 5;
    }

  6. #6
    thanks thanks thanks
    GOOD LIFE***

  7. #7

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.