Peter Cherry
12-10-2006, 02:29 PM
Hi,
please help, I have folowing code of this typewriter effect http://www.actionscript.org/showMovie.php?id=1265
1) I would like to display this text in the texfield not to split words in the middle of the word
stop()
i=1;
s=0;
y=20;
fxspeed=150;// change this for adjust speed
function dp(){
name="text text text text.....";
duplicateMovieClip(_root.cp,[i+"clip"],i);
_root[i+"clip"]._x=_root[(i-1)+"clip"]._x+10;
_root[i+"clip"]._y=y;
if(_root[i+"clip"]._x>Stage.width-15){
y=y+20;
_root[i+"clip"]._y=y;
_root[i+"clip"]._x=5;
}
_root[i+"clip"].textm=name.charAt(s);
s=s+1
i=i+1;
if(s>name.length){
s=0;
clearInterval(myint);
}
//removeMovieClip(_root[(i-20)+"clip"]);
trace(i)
}
myint=setInterval(dp,fxspeed);
2) I would like to implenet external raw text file as input, based on following code, but I donīt know how to bulid together with former code...
// load the text
var c_load = new LoadVars();
c_load.onData = function(raw) {
if(raw == undefined) {
// could not load the file, printing error instead
runTypeWriter(tf_reference, 'File could not be loaded!');
} else {
runTypeWriter(tf_reference, raw);
}
}
c_load.load('/file.txt');
3) and finnaly to autoscroll with a defined speed when the typewriter reaches the bottom of the textfield
Please help I am not the programmer
Thanks
Peter
please help, I have folowing code of this typewriter effect http://www.actionscript.org/showMovie.php?id=1265
1) I would like to display this text in the texfield not to split words in the middle of the word
stop()
i=1;
s=0;
y=20;
fxspeed=150;// change this for adjust speed
function dp(){
name="text text text text.....";
duplicateMovieClip(_root.cp,[i+"clip"],i);
_root[i+"clip"]._x=_root[(i-1)+"clip"]._x+10;
_root[i+"clip"]._y=y;
if(_root[i+"clip"]._x>Stage.width-15){
y=y+20;
_root[i+"clip"]._y=y;
_root[i+"clip"]._x=5;
}
_root[i+"clip"].textm=name.charAt(s);
s=s+1
i=i+1;
if(s>name.length){
s=0;
clearInterval(myint);
}
//removeMovieClip(_root[(i-20)+"clip"]);
trace(i)
}
myint=setInterval(dp,fxspeed);
2) I would like to implenet external raw text file as input, based on following code, but I donīt know how to bulid together with former code...
// load the text
var c_load = new LoadVars();
c_load.onData = function(raw) {
if(raw == undefined) {
// could not load the file, printing error instead
runTypeWriter(tf_reference, 'File could not be loaded!');
} else {
runTypeWriter(tf_reference, raw);
}
}
c_load.load('/file.txt');
3) and finnaly to autoscroll with a defined speed when the typewriter reaches the bottom of the textfield
Please help I am not the programmer
Thanks
Peter