Toon posts:

[FLASH MX] if ()...nextframe

Pagina: 1
Acties:

Verwijderd

Topicstarter
Ik wil een if statement doen in een preloader, zoals dit:
code:
1
2
3
4
if (statics.percent=="100%") 
 {
  nextFrame();
 }


maar dit werkt niet en heeft tot gevolg dat de hele preloader niet meer zichtbaar is...
hoe kan dit?

terwijl bv. button._visibility=true wel werkt

DIT WERKT OOK NIET:
code:
1
2
3
4
5
6
onClipEvent (load) {
if (statics.percent=="100%") 
    {
    loadMovieNum("start.swf", 0)
    }
}

;(

[ Voor 27% gewijzigd door Verwijderd op 05-01-2004 16:03 ]


Verwijderd

Je hebt wel wat problemen met die preloader aan je message history te zien. Misschien kun je wat duidelijk je probleem omschrijven, want ik snap er niet veel van, misschien wat meer code posten.

[ Voor 9% gewijzigd door Verwijderd op 05-01-2004 12:10 ]


Verwijderd

Topicstarter
ja nogal ja, maar het lukt steeds beter o.a. dankzij dit forum,

meer code ja...
de hele preloader dan maar?

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
targ.onLoad (); {
targ.loadMovie("start.swf");
}

st = new Date();
startSec = st.getSeconds();
startMin = st.getMinutes();
startHour = st.getHours();
startDay = st.getDay();

onEnterFrame = function(){

statics.bar._xscale = 0;


    nt = new Date();
    sec = nt.getSeconds() - startSec;
    min = nt.getMinutes() - startMin;
    hour = nt.getHours()- startHour;
    day = nt.getDay() - startDay;
    
    statics.totalbytes = targ.getBytesTotal();
    statics.loadedbytes = targ.getBytesLoaded();

    statics.percent = int(statics.loadedbytes/statics.totalbytes*100)+"%";
    statics.bar._xscale = int(statics.loadedbytes/statics.totalbytes*100);

    lsec = (day*24*60*60) + (hour*60*60) + (min*60) + sec;
    statics.timeelapsed = lsec + " sec";

    speedkb = Math.round((statics.loadedbytes/lsec)*10/1024)/10;
    statics.speed = speedkb + " kb/s";

    nkb = (statics.totalbytes - statics.loadedbytes) / 1024;

    nsec = Math.round(nkb/speedkb);
    statics.timetogo = nsec + " sec";

if (statics.percent=="100%")  {
this.loadMovie("start.swf");
 }

}
stop();