Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Opoznienie w petli for
Caporeira
post
Post #1





Grupa: Zarejestrowani
Postów: 36
Pomógł: 0
Dołączył: 27.11.2014

Ostrzeżenie: (0%)
-----


Potrzebuje wzkonac opoznienie w petli. Chodzi o to aby obiekt sie przesuwal co 125 punktow z mala predkoscia. Tego Timeouta nie potrzebuje bo on tylko opoznia start przesuwania, myslalem ze to on opozni wykonywanie petli. Pomoze mi ktos jak opoznic petle ?

  1. var value = 0;
  2. var minValue = 0;
  3. var maxValue = 7;
  4. var startValue;
  5. var stopValue = 750;
  6.  
  7. for(startValue = 0; startValue <= 750; startValue = startValue + 125){
  8.  
  9.  
  10. setTimeout(function() {webMI.gfx.setMoveY("id_61", offset)},4250);
  11. setTimeout(function() {webMI.gfx.setMoveY("id_69", offset)},2250);
  12.  
  13. var offset = webMI.translate(value, minValue, maxValue, startValue, stopValue);
  14.  
  15. //webMI.gfx.setMoveY("id_61", offset);
  16. //webMI.gfx.setMoveY("id_69", offset);
  17. }


Ten post edytował Caporeira 27.11.2014, 13:28:40
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 23.12.2025 - 08:35