
-----------------------------------
gilbamy
Fri May 05, 2006 12:28 pm

bouncing picture ?
-----------------------------------
Alright i need to make a picture that bounces around the screen and the picture does not get cut off okay my problem is that it shows the picture and the errow at my second Pic.Draw and my teacher wants us to use Draw.Pic and  i have to use the psuedo code that he gave us and he won't explain why mine does not work and i tried searching for what Draw.Pic was and it said that it was drawpic .%Amy Gilbank
%May 5 2006
%bounce.t 
%a progrsm that allows picture to bounce around 
var pic1,pic1w,pic1h,pic1x,pic1y,x,y,speedx,speedy:int
var backg : int
pic1:=Pic.FileNew("screwU.jpg")
pic1w:=Pic.Width(pic1)
pic1h:=Pic.Height(pic1)
pic1x:=100
pic1y:=150
x:=60
y:=60
speedx:=10
speedy:=10
loop
backg:=Pic.New(x,y,x+pic1w,y-pic1h)
Pic.Draw(pic1,x,y ,0)
delay(1000)
Pic.Draw(backg,600,800,0)
if pic1y>=450-pic1w or pic1x=700 - pic1w or pic1x=0 and pic1x =450-pic1w or pic1x=700 - pic1w or pic1x= 450 - pic1w or pic1x = 700 - pic1w or pic1x 