var MyForm : TclStyleForm; testbutton, universe, fruits:TclproButton; testimage:TclImage; MediaPlayer1 : TclMediaPlayer; i: Integer; void testbuttonclick; var clickedBtn:TClButton; { clickedBtn = TClButton(MyForm.Clsender); if (clickedBtn.Hint == '0') { MediaPlayer1.FileName = clPathCombine('beep-6-96243.mp3',Clomosy.AppFilesPath); MediaPlayer1.CurrentTime = 0; MediaPlayer1.Play; } { MediaPlayer1.Volume = 0.3; } { ShowMessage('Bu kategoride diğerlerinden farklı olarak hayvanların üzerine tıkladığın zaman çıkardıkları sesleri duyabilirsin.'); Clomosy.RunUnit('unit2'); } } void universeclick; var clickedBtn:TClButton; { clickedBtn = TClButton(MyForm.Clsender); if (clickedBtn.Hint == '0') { MediaPlayer1.FileName = clPathCombine('beep-6-96243.mp3',Clomosy.AppFilesPath); MediaPlayer1.CurrentTime = 0; MediaPlayer1.Play; } { MediaPlayer1.Volume = 0.3; } { Clomosy.RunUnit('unit3'); } } void fruitsclick; var clickedBtn:TClButton; { clickedBtn = TClButton(MyForm.Clsender); if (clickedBtn.Hint == '0') { MediaPlayer1.FileName = clPathCombine('beep-6-96243.mp3',Clomosy.AppFilesPath); MediaPlayer1.CurrentTime = 0; MediaPlayer1.Play; } { MediaPlayer1.Volume = 0.3; } { Clomosy.RunUnit('unit4'); } } { MyForm = TclStyleForm.Create(Self); testimage = MyForm.AddNewImage(MyForm,'testimage'); MyForm.SetFormBGImage(' https://i.hizliresim.com/tdhzmrh.png" rel="nofollow - https://i.hizliresim.com/tdhzmrh.png '); //animals MyForm.AddAssetFromUrl(' https://raw.githubusercontent.com/busra106/beraberogrenelim/main/beep-6-96243.mp3" rel="nofollow - https://raw.githubusercontent.com/busra106/beraberogrenelim/main/beep-6-96243.mp3 '); MediaPlayer1 = TclMediaPlayer.Create(MyForm); { testbutton = MyForm.AddNewproButton(MyForm,'testbutton',''); testbutton.Align = alCenter; testbutton.Margins.bottom=600; testbutton.Width = 200; testbutton.Height = 200; testbutton.Margins.left=20; MyForm.setimage(testbutton, ' https://i.hizliresim.com/4cn2wv3.png" rel="nofollow - https://i.hizliresim.com/4cn2wv3.png '); testbutton.clProSettings.FontHorzAlign = palCenter; testbutton.SetclProSettings(testbutton.clProSettings); } testbutton.Hint = IntToStr(i); MyForm.AddNewEvent(testbutton,tbeOnClick,'testbuttonclick'); //universe MyForm.AddAssetFromUrl(' https://raw.githubusercontent.com/busra106/beraberogrenelim/main/beep-6-96243.mp3" rel="nofollow - https://raw.githubusercontent.com/busra106/beraberogrenelim/main/beep-6-96243.mp3 '); MediaPlayer1 = TclMediaPlayer.Create(MyForm); { universe=MyForm.AddNewproButton(MyForm, 'universe', ''); universe.Align = alCenter; universe.Margins.bottom=100; universe.Width = 200; universe.Height = 200; universe.Margins.left=20; MyForm.setimage(universe, ' https://i.hizliresim.com/ren42pl.png" rel="nofollow - https://i.hizliresim.com/ren42pl.png '); universe.clProSettings.FontHorzAlign = palCenter; universe.SetclProSettings(universe.clProSettings); } testbutton.Hint = IntToStr(i); MyForm.AddNewEvent(universe,tbeOnClick,'universeclick'); //fruits MyForm.AddAssetFromUrl(' https://raw.githubusercontent.com/busra106/beraberogrenelim/main/beep-6-96243.mp3" rel="nofollow - https://raw.githubusercontent.com/busra106/beraberogrenelim/main/beep-6-96243.mp3 '); MediaPlayer1 = TclMediaPlayer.Create(MyForm); { fruits=MyForm.AddNewproButton(MyForm, 'fruits', ''); fruits.Align = alCenter; fruits.Margins.top=400; fruits.Width = 200; fruits.Height = 200; fruits.Margins.left=20; MyForm.setimage(fruits, ' https://i.hizliresim.com/jfdy665.png" rel="nofollow - https://i.hizliresim.com/jfdy665.png '); fruits.clProSettings.FontHorzAlign = palCenter; fruits.SetclProSettings(fruits.clProSettings); } testbutton.Hint = IntToStr(i); MyForm.AddNewEvent(fruits,tbeOnClick,'fruitsclick');
MyForm.Run; } --------------------------------------------------------------------------------------------- Bu koddaki universe butonuna tıkladığım zaman bir bip sesinin çıkmasını istiyorum. Testbutton butonunda bunu sağlıyor ancak universe butonunda ses çıkmadan diğer unite atlıyor. Neden olabilir?
|