PDA

View Full Version : load multiple xml files???



Inflicted
September 19th, 2003, 07:19 AM
In my movie is a slideshow with pictures. On opening it loads xml txt. What I want is when you click to the next picture, another txt file opens. How can I do that? Here's the example: http://www.tantesteef.nl/trein.html

Here's the code:
var xmlText = new XML();
xmlText.tf = textBox;
xmlText.onData = function(data) {
this.tf.html = true;
this.tf.htmlText = data;
};
xmlText.load("trein.txt");
next.onPress = function() {
if (myPic<7 && !fadein && !fadeout) {
fadeOut = true;
myPic++;
input = myPic;
}
};
back.onPress = function() {
if (myPic>1 && !fadein && !fadeout) {
fadeOut = true;
myPic--;
input = myPic;
}
};
container._alpha = 0;
myPic = 1;
// initiate change to new image when buttons are clicked
this.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (container._alpha>10 && fadeout) {
container._alpha -= 100;
}
if (container._alpha<10) {
loadMovie("images/trein/trein"+myPic+".jpg", "container");
fadeOut = false;
fadeIn = true;
}
if (container._alpha<100 && fadein && !fadeout) {
container._alpha += 10;
} else {
fadeIn = false;
}
};

regards

jingman
September 20th, 2003, 01:56 PM
you seriously need to start using the 'AS' tags dude. ;)


var xmlText = new XML();
xmlText.tf = textBox;
xmlText.onData = function(data) {
this.tf.html = true;
this.tf.htmlText = data;
};
xmlText.load("trein.txt");
next.onPress = function() {
if (myPic<7 && !fadein && !fadeout) {
fadeOut = true;
myPic++;
input = myPic;
}
};
back.onPress = function() {
if (myPic>1 && !fadein && !fadeout) {
fadeOut = true;
myPic--;
input = myPic;
}
};
container._alpha = 0;
myPic = 1;
// initiate change to new image when buttons are clicked
this.onEnterFrame = function() {
// when a new Photo is selected, fade out, load new image, and fade in
if (container._alpha>10 && fadeout) {
container._alpha -= 100;
}
if (container._alpha<10) {
loadMovie("images/trein/trein"+myPic+".jpg", "container");
fadeOut = false;
fadeIn = true;
}
if (container._alpha<100 && fadein && !fadeout) {
container._alpha += 10;
} else {
fadeIn = false;
}
};

Inflicted
September 20th, 2003, 02:50 PM
Can you tell me how to do that, dude....

regards

ahmed
September 20th, 2003, 02:55 PM
//code goes here

jingman
September 20th, 2003, 03:04 PM
Originally posted by Inflicted
dude....

:sigh:

Inflicted
September 20th, 2003, 03:35 PM
No offense man, but my name was'nt "dude" in the first place...

jingman
September 20th, 2003, 03:42 PM
Originally posted by Inflicted
No offense man, but my name was'nt "dude" in the first place...

Hehe, none taken - I'll stick to "Inflicted" from now on ;)

Inflicted
September 20th, 2003, 04:13 PM
Cheers jingman,

I now know how to post the code correctly(newbie..).
Thanks.

regards