PDA

View Full Version : scrapbook and typewriter effect problems


Fantasma
02-24-2005, 05:34 AM
OK, im a novice, so dont laugh at this: http://www.woohoo.org/carterolive.html

ive got two questions i hope someone can answer.

1. if you go to the scrapbook link, move around the photos, then go to a different link, those photos are still there, and in the way. how do i make the photos disappear when a new link is clicked on?

2. if you click on "Who is Carter" and the "Who is Olive?", you'll see a typewriter effect. But if you click on them again, the text starts turning into undecipherable gobbledygook. the text is being loaded from a .txt file. what's going on with this?

Thanks!

jessup
02-24-2005, 06:39 AM
1. i am assuming that the photos are actually movieclips at which case u can have them watch a variable of sorts and them tell them to goto invisible, set alpha properties, reset thier original x and y locations pretty much whatever u like. the easiest way to control a movielcip for me is the use of variables and havehe movieclips respond to them vars.

2. would have to see the code... i did notcie when i clicked on carter over and over again it worked fine. it wasent till i clicked on olive that it went to crap. like i said would have to see the code...

good luck

Fantasma
02-24-2005, 08:12 AM
thanks for the reply.

ive got the scripts in three frames, plus a text file.

frame 1:

loadVariables("cartertext.txt","");

frame 2:

if (loaded != "yes") {
gotoAndPlay(96);
}

frame 3:

stop();
var i = 0;
cartertext = "";
cartertext2 = "";
var my_array = txt.split("");
function textwritter() {
cartertext2 = cartertext;
cartertext = my_array[i];
cartertext = cartertext2+cartertext;
if (i+1<my_array.length) {
i++;
} else {
clearInterval(intervalID);
}
}
var intervalID = setInterval(textwritter, speed);

And then in my text file (cartertext.txt), it says:

&loaded=yes&
//Please do not edit this line.
&speed=80&
//The variable “speed” is actually the interval time in ms.
//Therefore the greater “speed” is, the slower the typing speed will be.
&txt=Born: September 4, 2001
Occupation: Pre-schooler
Hobbies: Biking, Playdough, Reading,
watering flowers in the garden
Fave Foods: Mushroom rice, ice
cream, skittles, dim sum
Dislikes: Eating Chinese hair
&

Help! Thanks.