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

Username:   Password: 
 RegisterRegister   
 Need Help with animation (Beginner Coding)
Index -> General Discussion
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
saahel




PostPosted: Mon Dec 07, 2015 12:29 pm   Post subject: Need Help with animation (Beginner Coding)

Hi, i will just cut to the chase, i would like to know how to make a [/b]square go from right to left of the screen with very simple codes, thank you for your help guys!

this is what i got for now:

var y : int
for decreasing x : 640 .. 0
y := round (0 / 640 * x + 200)
drawfillbox (x, y, 42, 220, 1)
delay (10)
drawfillbox (x, y, 42, 220, 0)
end for
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Mon Dec 07, 2015 7:24 pm   Post subject: RE:Need Help with animation (Beginner Coding)

You're almost there. Remember that a box has two sets of x and y coordinates. If you only change one set, the box will stretch instead of move.
Display posts from previous:   
   Index -> General Discussion
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: