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
problem s kodom

 
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
celebrus



Joined: 15 Aug 2004
Posts: 15
Location: VG

PostPosted: 25.07.2005 14:44    Post subject: problem s kodom Add user to your forum ignore list Reply with quote

što tu nije dobro?
Code:

//ova prva funkcija radi, ali na rollOut se ništa ne događa
//x je neki movieClip
_root.x.onRollOver = function() {
   function fadeout() {
      x._alpha -= 5;
      if (x._alpha == 0) {
         clearInterval(a);
      }
   }
   a = setInterval(fadeout, 10);
};
_root.x.onRollOut = function() {
   function fadein() {
      x._alpha += 5;
      if (x._alpha == 100) {
         clearInterval(b);
      }
   }
   b = setInterval(fadein, 10);
};

Back to top
View user's profile Send private message Send e-mail
velcro



Joined: 15 Sep 2004
Posts: 116

PostPosted: 25.07.2005 17:33    Post subject: Add user to your forum ignore list Reply with quote

Iskreno da ti velim - imas vise problema... tvoj tekuci problem je lako rijesiti tako da mjesto da definiras explicitne provjere tj. == stavis <= 0 ili >=100 u if-ove... e onda kad to popravis onda ovako od oka gledajuci ces naci jos problema s tim npr. sto ce ti se dogadjati ako korisnik napusti button prije nego alpha dodje do 100? U tom slucaju ce ti biti aktivna oba intervala istovremeno i ici malo gore - malo dolje Wink ... moras clearati oba intervala...
Back to top
View user's profile Send private message
_ ewinter



Joined: 17 Jul 2005
Posts: 14

PostPosted: 25.07.2005 19:04    Post subject: Add user to your forum ignore list Reply with quote

Code:

// ovaj kod u _root

fade = function(step) {
   x._alpha += step;
   if (step < 0 && x._alpha <= 0 || step > 0 && x._alpha >= 100) {
      clearInterval(iid);
      delete iid;
   }
    //updateAfterEvent();
}

x.onRollOver = function() {
   clearInterval(iid);
   iid = setInterval(fade, 10, -5);
}
x.onRollOut = function() {
   clearInterval(iid);
   iid = setInterval(fade, 10, 5);
}


(Ako ti ne smeta sto je reusability ovog koda nikakav.)
Back to top
View user's profile Send private message
celebrus



Joined: 15 Aug 2004
Posts: 15
Location: VG

PostPosted: 25.07.2005 20:04    Post subject: Add user to your forum ignore list Reply with quote

ok, hvala sad radi!
Back to top
View user's profile Send private message Send e-mail
velcro



Joined: 15 Sep 2004
Posts: 116

PostPosted: 25.07.2005 21:59    Post subject: Add user to your forum ignore list Reply with quote

E ewinter prijatelju - probao sam obje komponente nove - super rade Very Happy Samo sam slab na mailovima pa ne stignem odgovarati.. Embarassed
Back to top
View user's profile Send private message
_ ewinter



Joined: 17 Jul 2005
Posts: 14

PostPosted: 26.07.2005 00:16    Post subject: Add user to your forum ignore list Reply with quote

Znam da si zaposlen. Smile Uostalom i ja tako nekako odgovaram na malove, svake godine po jedanput, ako se nadje vremena. Smile

Pitao sam se je li "velcro" na mi3 pravi velcro ili kakav laznjak... Smile
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