From: "Akvile K." Date: 2011-12-11T08:49:01+09:00 Subject: Re: HELP: i need to programm a traffic light an it doesn't work one should not post long source codes in text, but here you go: Shoes.app :height=> 500, :width=> 500 do background white #fußgägerampel fill gainsboro rect 10,50,90,130 fill red a1=oval :top=> 60, :left=> 30, :radius=> 25 fill black a2=oval :top=> 120, :left=> 30, :radius=> 25 #autoampel fill gainsboro rect 210,45,150,300 fill black b1=oval :top=> 50, :left=> 245, :radius=> 40 fill black b2=oval :top=> 150, :left=> 245, :radius=> 40 fill green b3=oval :top=> 250, :left=> 245, :radius=> 40 def alle (dauer) tn=Time.now.to_i #Prozedur alle te=tn+dauer while tn 30, :top=> 150 do button "Walk" do #fußgängerampel alle 5 do fill red a1=oval :top=> 60, :left=> 30, :radius=> 25 fill black a2=oval :top=> 120, :left=> 30, :radius=> 25 end #Autoampel alle 5 do fill black b1=oval :top=> 50, :left=> 245, :radius=> 40 fill black b2=oval :top=> 150, :left=> 245, :radius=> 40 fill green b3=oval :top=> 250, :left=> 245, :radius=> 40 end end end end and the Test programm: def pause (dauer) tn = Time.now.to_i te = tn+dauer while tn 50, :left=> 150, :radius=> 25 pause (15) fill green oval :top=> 150, :left=> 150, :radius=> 25 end end end -- Posted via http://www.ruby-forum.com/.