How do you make a heart move across the screen?
Author |
Message |
lisa89
|
Posted: 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!! |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
AsianSensation
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
greenapplesodaex
![](http://img.photobucket.com/albums/v235/greenapplesodaex/big.jpg)
|
Posted: 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 |
|
|
|
|
![](images/spacer.gif) |
DanShadow
![](http://compsci.ca/v3/uploads/user_avatars/12142970654c996e83e6997.png)
|
Posted: 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. |
|
|
|
|
![](images/spacer.gif) |
|
|