JohannIcon
Programmer
This is my scenario:-
I have the main page, ie main.html which has a main menu embedded in it, and in the main menu, I have a button called News from which I load an asp page, news.asp, and populate some text fields which I have on the news.swf. However, these fields are not showing up. I have done some testing to check wether the asp is loading, and I am sure it is since it is going to the appropriate frame, so the problem must be either with the asp or else with the variables. Here is the code I have in the first frame of the news.fla file:-
stop();
myVars = new LoadVars();
myVars.load("data/news.asp?cachebuster="+getTimer());
myVars.onLoad = function(success) {
if (success) {
_root.NewsTit1.variable = "_root.myVars.news1";
_root.NewsTit2.variable = "_root.myVars.news2";
gotoAndPlay(5);
} else {
trace("not loaded"
;
}
};
and here is the contents of the asp file, which is like a text file with an asp extension:-
news1=This is the first news article, it has plenty of text. It relates to the setting up of voices, advertising and PR. Lots of text to go hear.. We need enough for the scroll bar.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
&news2=This is the second articleIt has planty of text which you can add to!!!Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
Can you tell me what am I doing wrong please?
Thanks for your help and time.
Johann
I have the main page, ie main.html which has a main menu embedded in it, and in the main menu, I have a button called News from which I load an asp page, news.asp, and populate some text fields which I have on the news.swf. However, these fields are not showing up. I have done some testing to check wether the asp is loading, and I am sure it is since it is going to the appropriate frame, so the problem must be either with the asp or else with the variables. Here is the code I have in the first frame of the news.fla file:-
stop();
myVars = new LoadVars();
myVars.load("data/news.asp?cachebuster="+getTimer());
myVars.onLoad = function(success) {
if (success) {
_root.NewsTit1.variable = "_root.myVars.news1";
_root.NewsTit2.variable = "_root.myVars.news2";
gotoAndPlay(5);
} else {
trace("not loaded"
}
};
and here is the contents of the asp file, which is like a text file with an asp extension:-
news1=This is the first news article, it has plenty of text. It relates to the setting up of voices, advertising and PR. Lots of text to go hear.. We need enough for the scroll bar.Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
&news2=This is the second articleIt has planty of text which you can add to!!!Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
Can you tell me what am I doing wrong please?
Thanks for your help and time.
Johann