Computer Science Canada

I need help with text animation. Please

Author:  Egyptian Mafia [ 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

Author:  Mazer [ Thu May 06, 2004 6:45 am ]
Post 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.

Author:  Egyptian Mafia [ Thu May 06, 2004 4:39 pm ]
Post subject: 

Thanks a lot.

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

Thanks

Author:  Tony [ Thu May 06, 2004 4:47 pm ]
Post subject: 

tutorials are the answer to everything Laughing

Author:  Egyptian Mafia [ Thu May 06, 2004 4:57 pm ]
Post 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

Author:  Paul [ Thu May 06, 2004 5:25 pm ]
Post subject: 

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

Author:  Egyptian Mafia [ Thu May 06, 2004 6:01 pm ]
Post subject: 

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

Author:  Egyptian Mafia [ Thu May 06, 2004 6:05 pm ]
Post 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

Author:  Paul [ Thu May 06, 2004 6:19 pm ]
Post subject: 

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

Author:  Egyptian Mafia [ Thu May 06, 2004 6:26 pm ]
Post 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")

Author:  Paul [ Thu May 06, 2004 6:32 pm ]
Post 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.

Author:  Egyptian Mafia [ Thu May 06, 2004 6:49 pm ]
Post 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.

Author:  Egyptian Mafia [ Thu May 06, 2004 6:54 pm ]
Post 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

Author:  Paul [ Thu May 06, 2004 7:06 pm ]
Post 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.

Author:  Egyptian Mafia [ Thu May 06, 2004 7:13 pm ]
Post 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

Author:  Egyptian Mafia [ Thu May 06, 2004 7:16 pm ]
Post subject: 

Hahaha, I did it but damn it, it is the spacing of the words. Now I have spaced them far away and they work but they get cut off the screen. What is the code for fullscreen.

Thanks

Author:  Paul [ Thu May 06, 2004 7:29 pm ]
Post subject: 

at the beginning of program
code:

setscreen ("graphics: max; max")

Author:  Egyptian Mafia [ Thu May 06, 2004 7:33 pm ]
Post subject: 

Sorry Paul, the max screen did not do the trick. Would you please help me with that stupid text problem. I am including the program once again.

Thanks

Author:  Egyptian Mafia [ Thu May 06, 2004 9:54 pm ]
Post subject: 

anyone care to help me fix the text overlaping

Thanks a lot

Author:  Egyptian Mafia [ Fri May 07, 2004 7:40 am ]
Post subject: 

no one Sad

Author:  p00p [ Fri May 07, 2004 8:23 am ]
Post subject: 

you can do a nice fade text in turing using for statements and all of the colors from white to black like 16 to 31 it looks cool and i think it can make a program look much more sophistocated then you would think turing woudl allow

Author:  Egyptian Mafia [ Fri May 07, 2004 8:34 am ]
Post subject: 

p00p, could you please tell me the code or something so i can see it in action. I am an extreme n00b. Thanx

Author:  Egyptian Mafia [ Fri May 07, 2004 9:40 am ]
Post subject: 

Please someone help me fix the problem. I need to finish this proggie for school it is due on tuesday.

Thanx a lot

Author:  p00p [ Fri May 07, 2004 2:20 pm ]
Post subject: 

procedure FadeIn (title : string, x, y : int, size, speed : int)
var font : int := Font.New ("Comic Sans MS:" + intstr (size))
for decreasing i : 31 .. 16
Font.Draw (title, x, y, font, i)
delay (speed)
end for
put ""
end FadeIn
procedure FadeOut (title : string, x, y : int, size, speed : int)
var font : int := Font.New ("Comic Sans MS:" + intstr (size))
for i : 16 .. 31
Font.Draw (title, x, y, font, i)
delay (speed)
end for
put ""
end FadeOut
FadeIn ("PUT TEXT HERE", 25, 199, 35, 100)
FadeOut ("PUT SAME TEXT HERE", 25, 199, 35, 100)

just enter the text you want in the bottom two lines, the text has to be the same for both FadeIn and FadeOut

Author:  Egyptian Mafia [ Sun May 09, 2004 10:11 am ]
Post subject: 

p00p, that does not work in the older version. I had to get V4.X.X to work out.

Thanks

Author:  Egyptian Mafia [ Sun May 09, 2004 2:03 pm ]
Post subject: 

FINALLY!!!!! This proggie is over...OMG! after a week, thanks to Paul and to p00p for all their help and thanks goes also to all the hard working peeps @ ComSci.ca for making this awesome site. Here is the proggie for it. I combined the text effect with the fade in effect. I also put in music to spice up my proggie.


: