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

Username:   Password: 
 RegisterRegister   
 I need help with text animation. Please
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Egyptian Mafia




PostPosted: Wed May 05, 2004 11:37 pm   Post subject: I need help with text animation. Please

Ok, I am making a proggie, and as u can see i am a n00b. and an extreme n00b too. Anyways I made a flashing program/text. I want the word Washo Soapo to appear once i run it, but i made it so the user must input the word Washo Soapo so he can see the text effect. I dont want that to happen. I want Washo Soapo to start flashing without the user having to input the word as the answer. Also, could someone also PLEASE PLEASE make an intro for me.

Thanks a lot Very Happy



My texteffect.t
 Description:

Download
 Filename:  My texteffect.t
 Filesize:  1.66 KB
 Downloaded:  211 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Mazer




PostPosted: Thu May 06, 2004 6:45 am   Post subject: (No subject)

Just a few things here:
Firstly, use a more descriptive topic name.
Second, instead of just asking them to input the word, just set your variable yourself!
code:

get word % change that line to
word := "washo soapo"

Third, do NOT ask somebody to make a intro for you. It's your job to make this and unless I'm getting paid, I've already done enough for you.
Egyptian Mafia




PostPosted: Thu May 06, 2004 4:39 pm   Post subject: (No subject)

Thanks a lot.

Also, I need help in putting a picture in between the animation. A picture of a soap.

Thanks
Tony




PostPosted: Thu May 06, 2004 4:47 pm   Post subject: (No subject)

tutorials are the answer to everything Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Egyptian Mafia




PostPosted: Thu May 06, 2004 4:57 pm   Post subject: (No subject)

Well, the tutorials helped me to do the animation. I cant seem to put the pic inside the animation. I put it but it is all messed up.

thanks
Paul




PostPosted: Thu May 06, 2004 5:25 pm   Post subject: (No subject)

All messed up in what way? post your new code.
Egyptian Mafia




PostPosted: Thu May 06, 2004 6:01 pm   Post subject: (No subject)

When i put in the picture, The picture is all messed up and it just messes up the program.
Egyptian Mafia




PostPosted: Thu May 06, 2004 6:05 pm   Post subject: (No subject)

Here is the proggie with pic, the pic just appears for like 5 seconds even tho i put in a delay. I want the pic to move in the middle or something.

Thanks



Text Effect2.t
 Description:

Download
 Filename:  Text Effect2.t
 Filesize:  964 Bytes
 Downloaded:  154 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Paul




PostPosted: Thu May 06, 2004 6:19 pm   Post subject: (No subject)

u have to have your Pic.Draw inside ur loop, or else it will be erased by the cls.
Egyptian Mafia




PostPosted: Thu May 06, 2004 6:26 pm   Post subject: (No subject)

it is inside the loop

var word :string
colour (black)
word := "washo soapo"
var font : int := Font.New ("Lucida Handwriting:" + intstr (20))
drawfillbox (0, 0, maxx, maxy, black)
var c, x, y : int

setscreen ("offscreenonly")
loop %HERE IS THE LOOP <<<<<<<<<<<

var soapPic : int
soapPic := Pic.FileNew ("soap.bmp")
Pic.Draw (soapPic, 100, 5, picCopy) <<<<<<<SEE IT IS OVER HERE!!!
delay (1000)
for ii : 1 .. maxy


for i : ii .. ii
randint (c, 0, 240)
Font.Draw (word, i, i, font, c)
end for


for iii : ii .. ii
randint (c, 0, 240)
Font.Draw (word, maxx - (Font.Width (word, font)) - iii, iii, font, c)
end for

for iv : ii .. ii
randint (c, 0, 240)
Font.Draw (word, iv, maxy - iv, font, c)
end for
for iiv : ii .. ii
randint (c, 0, 240)
Font.Draw (word, maxx - (Font.Width (word, font)) - iiv, maxy - iiv, font, c)
end for
View.Update
cls
drawfillbox (0, 0, maxx, maxy, black)
delay (10)


end for
end loop
setscreen ("nooffscreenonly")
Paul




PostPosted: Thu May 06, 2004 6:32 pm   Post subject: (No subject)

Most of the time, your moving text runs within the for loop, the cls is in the for loop, so you have to have your picture drawn inside the for loop as well, or else it won't show the pic as ur text moves. so put your
code:

Pic.Draw (soapPic, 100, 5, picCopy)

right after the delay (10) at the end.
Egyptian Mafia




PostPosted: Thu May 06, 2004 6:49 pm   Post subject: (No subject)

Thanx Paul, Your da man.

I now need help in putting other words along with Washo Soapo, so one text would say Washo Soapo, another would say It washes your face and your clothes too.

Thanks a lot man. I owe you big time.
Egyptian Mafia




PostPosted: Thu May 06, 2004 6:54 pm   Post subject: (No subject)

Paul, I did it, I made the two text appear. But they are overlaping each other.

Could you help please. I am posting the proggie again. Thanx so much Smile



Text Effect2.t
 Description:

Download
 Filename:  Text Effect2.t
 Filesize:  1.28 KB
 Downloaded:  132 Time(s)

Paul




PostPosted: Thu May 06, 2004 7:06 pm   Post subject: (No subject)

code:

Font.Draw (word, maxx - (Font.Width (word, font)) - iiv, maxy - iiv, font, c)
            Font.Draw (word2, maxx - (Font.Width (word2, font)) - iiv, maxy - iiv-50, font, c) %note the -50


thats cause ur drawing htem in the same place, u gotta move the Y coordinate or x of one of the lines. see above, where I made it maxy-iiv-50 in one of the lines.
Egyptian Mafia




PostPosted: Thu May 06, 2004 7:13 pm   Post subject: (No subject)

Sorry Paul, but the text is still over lapping.

Thanks though, I tried to change the 50 to 60 and then to 100 and nothing happened. Sad
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 2  [ 26 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: