
-----------------------------------
enimirahi
Tue Apr 21, 2009 3:34 pm

Animation
-----------------------------------
Hey so i'm haveing trubles with making this program made, not flash how can i do that though.
%The house  with window Scene

    colorback (blue)  
   
      var moonx : int 
moonx := 200 
loop
moonx := moonx + 1
drawfilloval (150 + moonx, 350, 20, 20, grey) 
delay (10)
cls
    %everywhere
    drawfillbox (100, 100, 300, 200, 7)     %house 
    drawline (100, 200, 200, 300, red)     %left 
    drawline (300, 200, 200, 300, red)     %right 
    drawline (100, 200, 300, 200, red) 
    drawfill (120, 201, red, red) 
  
    drawfillbox (115, 100, 150, 150, 30)     %door 
    drawfilloval (120, 118, 5, 5, black)     %doorknob 
    drawfillbox (100, 200, 300, 250, red)     %chimmeney 
    %Stars 
    drawfillstar (120, 320, 140, 340, yellow) 
    drawfillstar (200, 350, 220, 370, yellow) 
    drawfillstar (220, 320, 240, 340, yellow) 
    drawfillstar (330, 430, 350, 450, yellow) 
    drawfillstar (150, 350, 170, 370, yellow) 
    drawfillstar (170, 300, 190, 320, yellow) 
    drawfillstar (450, 350, 470, 370, yellow) 
    drawfillstar (480, 380, 500, 400, yellow) 
    drawfillstar (520, 300, 540, 320, yellow) 
    drawfillstar (600, 320, 620, 340, yellow) 
    drawfillstar (520, 320, 540, 340, yellow) 
    drawfillstar (600, 240, 620, 260, yellow) 

    drawfillbox (212, 245, 180, 212, 30) 
    drawfillbox (180, 140, 245, 180, 100) 
    drawline (180, 160, 245, 160, 42) 
    drawline (212, 140, 212, 180, 42) 
     
end loop
 
I am useing turing 4.0

Mod Edit: Remember to use syntax tags! The template was also placed there for a reason

-----------------------------------
richcash
Tue Apr 21, 2009 3:43 pm

Re: Animation
-----------------------------------
Use View.Set ("ofscreenonly") and View.Update. Read [url=http://compsci.ca/v3/viewtopic.php?t=12533]this tutorial. Also, you should use syntax tags when posting your code. Check the [wiki]BBCode[/wiki] wiki article for information on how to do that.

Edit : Actually, read [url=http://compsci.ca/v3/viewtopic.php?t=20722]this sticky instead to learn how to use syntax tags.

-----------------------------------
blankout
Tue Apr 21, 2009 4:30 pm

Re: Animation
-----------------------------------
Even after you use View.Set and View.Update, your moon like shape does not repeat, it simply moves across the screen, then disappears. Because of your loop, the moon is going to continue to move farther and farther off the screen, you should truly consider trying to find a way to reset the position of the moon

-----------------------------------
enimirahi
Tue Apr 21, 2009 5:01 pm

RE:Animation
-----------------------------------
um ok im still not so clear bout what u just said

-----------------------------------
saltpro15
Tue Apr 21, 2009 5:26 pm

RE:Animation
-----------------------------------
what do you have against writing full, complete sentences?  it makes it so much easier to help you...

blankout means having something like

if moonx > maxx - 150 then
moonx := 1
end if


-----------------------------------
enimirahi
Tue Apr 21, 2009 6:11 pm

RE:Animation
-----------------------------------
oh ok thnx
