T010
11-25-2006, 02:54 PM
Hello I have this problem:
I'm making a site which has a main SWF file for the layout (navigation and such) and the content loads in an external SWF.
Now the external SWF (page1.swf) uses a .TXT file (page1.txt) which contains the actual content (text) for the page.
page1.swf contains this code:
System.useCodepage = true;
content.html = true;
myLoadVar = new LoadVars();
myLoadVar.load("content/page1.txt");
myLoadVar.onLoad = function(success){
if(success == true){
content.htmlText = myLoadVar.content;
}
};
This is all working fine, but:
I have some text in the .TXT file, that has to be linked to a .SWF file.
like this:
in the .TXT file I have this:
<a href="page2.swf">click here to go to page 2</a>
and the page2.swf file is just another .SWF file which uses yet another .TXT file (page2.txt) for the actual content.
It might sound weird or hard to understand, but it definitely works great.
The actual question is:
How do I set the target in the <a href> tag so that the 'page2.swf' loads in the same .SWF as 'page1.swf'
Right now, whatever I tried, it either opens in a new browser window, or opens in the main .SWF file.
I'm making a site which has a main SWF file for the layout (navigation and such) and the content loads in an external SWF.
Now the external SWF (page1.swf) uses a .TXT file (page1.txt) which contains the actual content (text) for the page.
page1.swf contains this code:
System.useCodepage = true;
content.html = true;
myLoadVar = new LoadVars();
myLoadVar.load("content/page1.txt");
myLoadVar.onLoad = function(success){
if(success == true){
content.htmlText = myLoadVar.content;
}
};
This is all working fine, but:
I have some text in the .TXT file, that has to be linked to a .SWF file.
like this:
in the .TXT file I have this:
<a href="page2.swf">click here to go to page 2</a>
and the page2.swf file is just another .SWF file which uses yet another .TXT file (page2.txt) for the actual content.
It might sound weird or hard to understand, but it definitely works great.
The actual question is:
How do I set the target in the <a href> tag so that the 'page2.swf' loads in the same .SWF as 'page1.swf'
Right now, whatever I tried, it either opens in a new browser window, or opens in the main .SWF file.