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

Username:   Password: 
 RegisterRegister   
 Movie Delay Effect
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
@DRI@N




PostPosted: Tue May 25, 2004 5:26 pm   Post subject: Movie Delay Effect

This is very basic..but will give you the general idea. Then you can add it in loops or let the user type the location.
code:

colorback(black)
for row:1..25
    for col:1..80
    put" "..
    end for
end for

color(white)


locate(22,30)
delay(100)
put"A"
locate(22,31)
delay(100)
put"C"
locate(22,32)
delay(100)
put"A"
locate(22,33)
delay(100)
put"P"
locate(22,34)
delay(100)
put"U"
locate(22,35)
delay(100)
put"L"
locate(22,36)
delay(100)
put"C"
locate(22,37)
delay(100)
put"O"
locate(22,38)
delay(100)
put","
locate(22,39)
delay(100)
put"M"
locate(22,40)
delay(100)
put"E"
locate(22,41)
delay(100)
put"X"
locate(22,42)
delay(100)
put"I"
locate(22,43)
delay(100)
put"C"
locate(22,44)
delay(100)
put"O"
Sponsor
Sponsor
Sponsor
sponsor
guruguru




PostPosted: Tue May 25, 2004 6:06 pm   Post subject: (No subject)

Source code. #4 Razz
Paul




PostPosted: Tue May 25, 2004 6:08 pm   Post subject: (No subject)

lol, yes, not in help
or this
code:

var word: string:="ACAPULCO,MEXICO"
var cola: int:=30
colorback(black)
for row:1..25
    for col:1..80
    put" "..
    end for
end for
color(white)
for a: 1..length(word)
locate(22,cola)
cola+=1
put word(a)
delay (100)
end for
beard0




PostPosted: Fri May 28, 2004 1:38 pm   Post subject: (No subject)

or even cleaner:
code:
var word : string := "ACAPULCO,MEXICO"
colorback (black)
put repeat (" " + chr (10), maxrow)
color (white)
locate (22, (maxcol - length (word)) div 2)
for a : 1 .. length (word)
    put word (a)..
    delay (100)
end for
Tony




PostPosted: Fri May 28, 2004 1:45 pm   Post subject: (No subject)

would it not be simpler to use cls instead of put repeat (" " + chr (10), maxrow) ? Razz
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
beard0




PostPosted: Sun May 30, 2004 5:28 pm   Post subject: (No subject)

Ouch! Ya tony, you're right. I deserve a swift kick to the head on that one. With that adjustment though, i think we've cleaned up the movie char by char delay effect nicely.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: