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

Username:   Password: 
 RegisterRegister   
 How do you make a heart move across the screen?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
lisa89




PostPosted: Mon Jun 14, 2004 1:28 pm   Post subject: How do you make a heart move across the screen?

I'm making a program for school and at the end i need a heart to move across the screen from left to right.. if you can help me that would great!!
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Mon Jun 14, 2004 1:45 pm   Post subject: (No subject)

you can import a picture, and when you are drawing it, do something like this:

code:
var picID := Pic.FileNew ("heart.bmp")
var x, y := 0

loop
    x += 5
    Pic.Draw (picID, x, y, picMerge)
    cls
end loop



of course, you need a picture called heart.bmp in the same folder as the code.
greenapplesodaex




PostPosted: Mon Jun 14, 2004 2:05 pm   Post subject: reply

yeah, what he said...
or you can use sprite... i dont know, the new turing added some new graphical functions, i havent look at them yet, maybe you dont need sprite at all
DanShadow




PostPosted: Mon Jul 26, 2004 6:56 pm   Post subject: (No subject)

I got bored, this code is like an update of AS.
code:

var heartPic:int:=Pic.FileNew("heart.bmp")
var x,y:=0
y:=round(maxy/2)
loop
setscreen("offscreenonly")
View.Update
cls
x+=5
Pic.Draw(heartPic,x,y,picMerge)
if x>maxx then
x:=0
end if
end loop

lol...I need a life outside work and compsci.
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  [ 4 Posts ]
Jump to:   


Style:  
Search: