- FloatAnimation1.Stop;
- for i := 0 to Image2.ChildrenCount - 1 do
- if Image2.Children[i].ClassName = ListBox1.Items[ListBox1.ItemIndex] then
- s := Image2.Children[i];
- s.Parent := Image1;
- FloatAnimation1.Parent := s;
- SetObjectProp(s, 'target', Image2.Bitmap);
- FloatAnimation1.Start;
+ if FloatAnimation1.Running = true then
+ begin
+ progress := true;
+ FloatAnimation1.Stop;
+ end;
+ for i := 0 to Button1.ChildrenCount - 1 do
+ if Button1.Children[i].ClassName = ComboBox1.Items[ComboBox1.ItemIndex]
+ then
+ begin
+ s := Button1.Children[i];
+ s.Parent := Image1;
+ FloatAnimation1.Parent := s;
+ SetObjectProp(s, 'target',
+ ListView1.Items[ListView1.ItemIndex + 1].Bitmap);
+ FloatAnimation1.Start;
+ break;
+ end;