Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 help with loop animation please
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
dmitrip




PostPosted: Sat Feb 17, 2007 2:37 pm   Post subject: help with loop animation please

hi, i need to make a program for school of an animation of my choice using a loop, so i decied to make a circle go from left to right and when the circle hits the "wall" it changes colour.

this is the code i have so far but it deos not seem to be working well

any help will be very appreciated thank you:)


[code]

for paint: 1..5

delay(500)

for a : 40 .. 600

drawfilloval (a , 40, 40,40, paint)

for decreasing b : 600..40

delay(10)
cls
drawfilloval (b , 40, 40,40, paint)



end for
end for
end for

[code]
Sponsor
Sponsor
Sponsor
sponsor
LindenRulz




PostPosted: Sun Feb 18, 2007 3:05 pm   Post subject: Re: help with loop animation please

I have a solution that works really well!

for paint : 1 .. 5
for a : 40 .. 600
drawfilloval (a , 40, 40,40, paint)
delay (10)
cls
if a = 600 then
for decreasing b : 600..40
delay(10)
cls
drawfilloval (b , 40, 40,40, paint)
end for
end if
end for
end for
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: