Autor Beitrag
bazic
Hält's aus hier
Beiträge: 3

Win XP
Delphi 6
BeitragVerfasst: Di 01.02.05 19:43 
hallo zusammen

ich will ein paar labels unterschiedlich schnell fallen lassen. das sie alle zusammen fallen hab ich schon hinbekommen. nur jetzt sollen diese unterschiedlich schnell fallen und auch von unterschiedlichen positionen aus. die frage ist nur: wie?

hier mal ein auszug aus dem quellcode:

ausblenden volle Höhe Delphi-Quelltext
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:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
FOR i:=64 TO 630 DO BEGIN
Label4.top:=i;
if  ((label4.top + label4.height >= image3.top) and
     (label4.top <= image3.top+image3.height))
    and ((label4.left+label4.width>=image3.left) and
         (label4.left <= image3.left+image3.width))
    then
     label4.Visible:=false;
Label5.Top:=i;
if  ((label5.top + label5.height >= image3.top) and
     (label5.top <= image3.top+image3.height))
    and ((label5.left+label5.width>=image3.left) and
         (label5.left <= image3.left+image3.width))
    then
     label5.Visible:=false;
Label6.top:=i;
if  ((label6.top + label6.height >= image3.top) and
     (label6.top <= image3.top+image3.height))
    and ((label6.left+label6.width>=image3.left) and
         (label6.left <= image3.left+image3.width))
    then
     label6.Visible:=false;
Label7.Top:=i;
if  ((label7.top + label7.height >= image3.top) and
     (label7.top <= image3.top+image3.height))
    and ((label7.left+label7.width>=image3.left) and
         (label7.left <= image3.left+image3.width))
    then
     label7.Visible:=false;
Label8.top:=i;
if  ((label8.top + label8.height >= image3.top) and
     (label8.top <= image3.top+image3.height))
    and ((label8.left+label8.width>=image3.left) and
         (label8.left <= image3.left+image3.width))
    then
     label8.Visible:=false;
Label9.Top:=i;
if  ((label9.top + label9.height >= image3.top) and
     (label9.top <= image3.top+image3.height))
    and ((label9.left+label9.width>=image3.left) and
         (label9.left <= image3.left+image3.width))
    then
     label9.Visible:=false;
Label10.top:=i;
if  ((label10.top + label10.height >= image3.top) and
     (label10.top <= image3.top+image3.height))
    and ((label10.left+label10.width>=image3.left) and
         (label10.left <= image3.left+image3.width))
    then
     label10.Visible:=false;
Label11.Top:=i;
if  ((label11.top + label11.height >= image3.top) and
     (label11.top <= image3.top+image3.height))
    and ((label11.left+label11.width>=image3.left) and
         (label11.left <= image3.left+image3.width))
    then
     label11.Visible:=false;
Label12.top:=i;
if  ((label12.top + label12.height >= image3.top) and
     (label12.top <= image3.top+image3.height))
    and ((label12.left+label12.width>=image3.left) and
         (label12.left <= image3.left+image3.width))
    then
     label12.Visible:=false;
Label13.Top:=i;
if  ((label13.top + label13.height >= image3.top) and
     (label13.top <= image3.top+image3.height))
    and ((label13.left+label13.width>=image3.left) and
         (label13.left <= image3.left+image3.width))
    then
     label13.Visible:=false;
{Label14.top:=i;
Label15.Top:=i;
Label16.top:=i;
Label17.Top:=i;}

Delay(60);

end;


ich denke mal das ich das ganze über delays steuer muss oder? nur wo müssen diese dann stehen?
Radioactive
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 179

Win 98, Win XP Home SP2
D3 Prof, D7 Pers, D2005 Pers
BeitragVerfasst: Di 01.02.05 20:17 
steuer das ganze doch über einen Timer. Dann schreibst du deine Fall-Anweisungen in den die Timer1Timer-Methode und schaltest des Timer beim klicke auf Button1 (oda was du willst) ein und stoppst ihn wieder, wenn deine Labels am Boden liegen...
Und über das Intervall des Timers steuerst du die Geschwindigkeit.

_________________
Radioactive
"Wer scrollt, verliert!" Matthias Stein, Informatiklehrer am GG
bazic Threadstarter
Hält's aus hier
Beiträge: 3

Win XP
Delphi 6
BeitragVerfasst: Di 01.02.05 20:35 
funktioniert das mit dem timer auch wenn das label was auf dem "boden liegt" automatisch wieder von oben neu runterfallen soll?