salve!!!
vorrei sapere come creare un preloaded che carica una animazione.
Ho provato vari metodi ma quasi tutti davano errori.
Qualcuno e cosi gentile che mi spiega il trucco?
ciao & grazie![]()
salve!!!
vorrei sapere come creare un preloaded che carica una animazione.
Ho provato vari metodi ma quasi tutti davano errori.
Qualcuno e cosi gentile che mi spiega il trucco?
ciao & grazie![]()
nessun trucco!
posta il code dei tuoi tentativi.. probabile che ci sia qualcosa da aggiustare,inoltre serve sapere se usi il preload sul primo frame e dopo go... oppure se usi le scene
Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
Mechanics & Expert Tuning Fix Z3 Roadster Community
Grazie mille!!!
ciao da alessandro2110![]()
dov'è il code dei tentativi..Originariamente inviato da Alessandro2110
Grazie mille!!!
ciao da alessandro2110![]()
![]()
Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
Mechanics & Expert Tuning Fix Z3 Roadster Community
LOL![]()
fai un test in questo modo..Originariamente inviato da frecciak
LOL![]()
apri un nuovo documento flash..
- sfondo bianco
- crea due livelli
- in quello sopra al primo frame ci metti tutto il code che ti metto poi sotto..
- nel livello sotto, ma solo nel secondo frame ci metti una immagine a tuo piacere.. con uno stop(); (metti un'immagine pesante per fare il test)
- poi fai Ctrl+Invio due volte per testare il preload
questo è il code per il livello sopra:
codice:Movieclip.prototype.loader = function(posX, posY, width0, height0, color0) { this.createEmptyMovieClip("preloading", 1); preloading.onLoad = function () { time_1=int(getTimer()/1000); } preloading.onEnterFrame = function() { // Preloading Position this._x = posX; this._y = posY; // Total Bytes loaded / Total Bytes ptotal = _root.getBytesTotal(); pdown = _root.getBytesLoaded(); // Time Left time=(getTimer()/1000)-teit_1; bps= pdown/time; bytes_left = ptotal-pdown; leftsek= Math.ceil(bytes_left/bps); min=Math.floor(leftsek/60); if(min>=1){ leftsek-= Math.floor(min*60); if (leftsek < 10){ leftsek= "0"add leftsek;} }else{ min="0"; if (leftsek < 10){ leftsek= "0"add leftsek;} } leftTime = min + ":" + leftsek; bits = bps/1024; // BandWide Kbps = Math.round(bits); // pourcentage & Ko loaded / Ko total pourcent = (int((pdown/ptotal)*100)); kodown = Math.round(pdown/1024); kototal = Math.round(ptotal/1024); // Preloading barre this.createEmptyMovieClip("bar2", 3); this.bar2.lineStyle(1, 0x353535, 90) this.bar2.moveto(width0, height0); this.bar2.lineto(width0, 0); this.bar2.lineto(0, 0); this.bar2.lineto(0, height0); this.bar2.lineto(width0, height0); this.createEmptyMovieClip("bar", 2); this.bar.beginFill(color0, 80); this.bar.moveto(pourcent*width0/100, height0); this.bar.lineto(pourcent*width0/100, 0); this.bar.lineto(0, 0); this.bar.lineto(0, height0); this.bar.lineto(height0, height0); this.bar.endFill(); // Textfield this.createTextField("pFeld", 1, -2, 5, 100, 16); this.pFeld.autoSize = "left"; this.pFeld.selectable = false; this.pFeld._y += (height0); // Textfeld Format this.mForm = new TextFormat(); this.mForm.font = "Arial"; this.mForm.size = 10; this.mForm.bold = true; this.mForm.color = 0x353535; this.pFeld.text = "Chargement : " + pourcent+" %"+"\r" +kodown+"/"+kototal+" Ko au total" + "\rTemps restant : " + leftTime + "\rDébit : " + Kbps + " Ko/s" + "\n" + "\rOS : " + System.capabilities.os + "\r" +"Ecran : " + System.capabilities.screenResolutionx +"*"+ System.capabilities.screenResolutiony + "\r" +"Résolution : " + System.capabilities.screenDPI + "\r" +"Player version : " + System.capabilities.version + "\r" +"Langue : " + System.capabilities.language this.pFeld.setTextFormat(this.mForm); // Finish Loading if (ptotal == pdown) { preloading.removeMovieClip(); _root.nextFrame(); } }; }; loader(20, 20, 200, 5, 0xCCCCCC); stop();
Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
Mechanics & Expert Tuning Fix Z3 Roadster Community
grazie mille dell'aiuto!!
pero ti volevo comunicare che facendo tutti i passaggi da te catalogati e premendo ctrl+invio mi esce il seguente errore:
**Errore** Scena=Scena 1, livello=Livello 1, fotogramma=1:Linea 65: Nessuna proprietà denominata 'screenResolutionx'.
this.pFeld.text = "Chargement : " + pourcent+" %"+"\r"
Grazie...![]()
con quale flash hai testato...?(devi testare con flash mx, oppure anche con flash 2004, ma devi settare flash 6 e AS 1.0)Originariamente inviato da Alessandro2110
grazie mille dell'aiuto!!
pero ti volevo comunicare che facendo tutti i passaggi da te catalogati e premendo ctrl+invio mi esce il seguente errore:
**Errore** Scena=Scena 1, livello=Livello 1, fotogramma=1:Linea 65: Nessuna proprietà denominata 'screenResolutionx'.
this.pFeld.text = "Chargement : " + pourcent+" %"+"\r"
Grazie...![]()
Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
Mechanics & Expert Tuning Fix Z3 Roadster Community
ciao!!
ho testato con flash mx 2004 e ho settato come hai detto tu flash player 6 e - as 1.0 ma pero questa volta l'errore non mi è uscito pero nel caricanemto non esce alcuna barra che mi dice a che punto stà
grazie!!
spero tu non abbia nulla sopra o che copre il preload.. e che tu abbia configurato i vari colori sia del testo che della barra, in base al colore del tuo sfondo..Originariamente inviato da Alessandro2110
ciao!!
ho testato con flash mx 2004 e ho settato come hai detto tu flash player 6 e - as 1.0 ma pero questa volta l'errore non mi è uscito pero nel caricanemto non esce alcuna barra che mi dice a che punto stà
grazie!!
semplicemente xchè il preload è funzionante e testato.
Interactive Html/CSS/JS Playground | @webbeloz ( cip..cip! )
Mechanics & Expert Tuning Fix Z3 Roadster Community