Forum FAQForum FAQSearchSearch MemberlistMemberlist Forum ignore listForum ignore list RegisterRegister ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in
movieClip.getBytesLoaded() i getBytesTotal()

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash
View previous topic :: View next topic  
Author Message
nemogirl



Joined: 27 Oct 2004
Posts: 386
Location: istra

PostPosted: 30.09.2008 08:04    Post subject: movieClip.getBytesLoaded() i getBytesTotal() Add user to your forum ignore list Reply with quote

kreiram novi mc i u njega loadam jpg sa loadMovie.
i onda provjeravam da li se slika loadala prije nego je stavim u masku:

Code:
var infoLoaded:Number = mc.getBytesLoaded();
   var infoTotal:Number = mc.getBytesTotal();
   
   if (infoLoaded == infoTotal) {
      return true;
   } else {
      return false;
   }


ali kad provjerim vrijednosti ispada mi da mi getBytesLoaded() i getBytesTotal() vraca istu vrijednost, i to nekad oba dva ukupunu, a nekad 0.
ne kuzim di je caka Sad
inace, taj kod pozivam kroz loop iz kojeg izadjem kad mi ta funkcija vrati vrijednost true.
helppp!
Back to top
View user's profile Send private message
nemogirl



Joined: 27 Oct 2004
Posts: 386
Location: istra

PostPosted: 30.09.2008 08:19    Post subject: Add user to your forum ignore list Reply with quote

jos jedna stvar:
upravo sam skuzila da mi sve radi ok kad playam sam swf. a kad ga gledam unutar html stranice - onda se javlja taj problem. Confused
Back to top
View user's profile Send private message
nemogirl



Joined: 27 Oct 2004
Posts: 386
Location: istra

PostPosted: 30.09.2008 10:18    Post subject: Add user to your forum ignore list Reply with quote

ako nekoga zanima rjesenje: problem je bio u tome sto je flashu trebalo malo vremena da izvrsi getBytesLoaded i zato bi se uvjet ispunio odmah na pocetku (obje varijable bi bile 0).
stvar sam rijesila tako sto sam ubacila jos jedan uvjet:
Code:
if ((infoLoaded == infoTotal) and (infoTotal != 0)) {
...
}


Cool
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    mi3dot.org Forum Index -> Flash All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group