celeritycat
04-02-2006, 05:08 AM
Ok, I have a flash file, actually it's the loadimages fun file from http://necromanthus.com/KoolMoves/LoadImages.html
I want to add dynamic text for each picture by loading a text file. I want the first text file to load on load and every other file to load corresponding with the images. I can get the text to load, but it doesn't keep up with the buttons to go foward and backward. There are five pictures and I have five text files. The first has AC like this and this where the first text sholud show up.
scr._alpha = 0;
pic = 1;
input = pic;
_root.onEnterFrame = function() {
if (scr._alpha>10 && fadeOut) {
scr._alpha -= 10;
}
if (scr._alpha<10) {
scr.loadMovie("Images/image"+pic+".jpg", "_self");
fadeOut = false;
fadeIn = true;
}
if (scr._alpha<100 && fadeIn && !fadeOut) {
scr._alpha += 10;
} else {
fadeIn = false;
}
if (input>5) {
input = 5;
}
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
pic = input;
}
};
inputField.onKillFocus = function() {
input = pic;
};
stop();
Now the buttons foward AC
on(press){
if (pic<5 && !fadeIn && !fadeOut) {
fadeOut = true;
pic++;
input = pic;
}
}
and back
on(press){
if (pic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
pic--;
input = pic;
}
}
Can anyone help me get this right!
FYI the images are all image 1,2,3.. and text is txt1, 2, 3..
I want to add dynamic text for each picture by loading a text file. I want the first text file to load on load and every other file to load corresponding with the images. I can get the text to load, but it doesn't keep up with the buttons to go foward and backward. There are five pictures and I have five text files. The first has AC like this and this where the first text sholud show up.
scr._alpha = 0;
pic = 1;
input = pic;
_root.onEnterFrame = function() {
if (scr._alpha>10 && fadeOut) {
scr._alpha -= 10;
}
if (scr._alpha<10) {
scr.loadMovie("Images/image"+pic+".jpg", "_self");
fadeOut = false;
fadeIn = true;
}
if (scr._alpha<100 && fadeIn && !fadeOut) {
scr._alpha += 10;
} else {
fadeIn = false;
}
if (input>5) {
input = 5;
}
if (Key.isDown(Key.ENTER)) {
fadeOut = true;
pic = input;
}
};
inputField.onKillFocus = function() {
input = pic;
};
stop();
Now the buttons foward AC
on(press){
if (pic<5 && !fadeIn && !fadeOut) {
fadeOut = true;
pic++;
input = pic;
}
}
and back
on(press){
if (pic>1 && !fadeIn && !fadeOut) {
fadeOut = true;
pic--;
input = pic;
}
}
Can anyone help me get this right!
FYI the images are all image 1,2,3.. and text is txt1, 2, 3..