stringy: you could use this with the loadvars
i am now starting to look into that. would that be just changeing the startoff=(“my text at start”); to startoff = myVar;
i tryed that but could not get it to work
stringy: you could use this with the loadvars
i am now starting to look into that. would that be just changeing the startoff=(“my text at start”); to startoff = myVar;
i tryed that but could not get it to work
you would have to put it in your loadVars.onload event
lv.onLoad = function() {
startOff(this.myVar);
//And if you want it to keep repeating
finterval = setinterval(startoff, 5000, this.myVar);
};
thanks i will try that when i get home from work.
rL
Not exactly sure what you mean. I`ve bodged the last 2 attempts together here, hope its what you want. If you only want one long string just delete the other elements of the array.
thanks for the fla stringy…it’s perfect that’s what i want actually…
you are welcome
Hi Stringy,
I’ve been following this thread. Good works!
I understand how to set the interval, and import the sound for this case study.
In my project, the sound that I imported is actually, the naration of the sentences. My question: Is that possible to set different interval for different sentences ( according to the length of the mp3 sound imported?)
Thanks Stringy
I think you are probably looking at this the wrong way. You could adjust the length of time the letters shift by passing a variable to counter but another way would be to use onSoundComplete() to end the function.
Have a look at this, might help you get going.
http://www.gifsrus.com/testfile/fadeinout/longt.zip
Ah,…that’s just awesome. Million Thanks!
Hi Stringy,
Sorry to bother you again. For my project, I don’t really need the random appearance of each string. I just want the text appear ( no fancy effect like fade-in, out or something). In this way, people will see/read the text, while in the background the sound is playing.
I have tried to delete the random in this function :
function messup(son) {
counter++;
mystring = "";
for (i=0; i<displayLength; i++) {
b = +displaytext.substr(random(displayLength), 1);
mystring += b;
}
to this :
function messup(son) {
counter++;
mystring = "";
for (i=0; i<displayLength; i++) {
b = +displaytext.substr((displayLength), 1);
mystring += b;
}
but now the text appear after the sound is finished. Can you show me where should I change to make the text appear first without waiting the respective sound successfully being loaded.
I do really appreciate your help
you are welcome. I guess you solved your other problem but i just did quickly(same file)
myArray = ;
k = 0;
mySound1 = new Sound();
mySound1.attachSound(“s1”);
mySound2 = new Sound();
mySound2.attachSound(“s2”);
mySound3 = new Sound();
mySound3.attachSound(“s3”);
myArray.push([“hello hello”, mySound1]);
myArray.push([“all cows eat grass”, mySound2]);
myArray.push([“when in rome”, mySound3]);
function startoff(v1, v2) {
clearInterval(finterval);
mystring = v1;
v2.start();
v2.onSoundComplete = function() {
k++;
if (k == myArray.length) {
k = 0;
}
finterval = setinterval(startoff, 50, myArray[k][0], myArray[k][1]);
:: Copyright KIRUPA 2024 //--