Skip to main content
Known Participant
November 12, 2006
Question

html links: link from one text box to another

  • November 12, 2006
  • 18 replies
  • 861 views
Can anyone tell me how i can get a bunch of links from an external text file, rendered in a text box, link to another text file, that renders in another text box? Im trying to make it that when you click on the link in the first textbox, it opens up the corresponding linked content in the other textbox, instead of opening up a browser window. If anyone knows how to do this, it would be most appreciated. Thanks
This topic has been closed for replies.

18 replies

fanmap81Author
Known Participant
November 27, 2006
arunbe, im not quite sure i understand what it is your saying
November 27, 2006
Hi fanmap81,

Wrinting so many functions is not fair.
So, if you are adding more retailers means then again you have to write more functions and will continue the same till you get a set of fixed retailers.
So , its better you can use some variable that will be passed from the asfunctions and can get it in the Flash. So that you can identify that variable and can proceed according to that....
fanmap81Author
Known Participant
November 26, 2006
what?
Inspiring
November 25, 2006
I can tell you that "a bunch" is the collective noun for grapes.
An nothing else.
fanmap81Author
Known Participant
November 24, 2006
alright i got it to work......it seems that if you embed the text in the textbox, it wont work. I have one last thing to ask. How do i write the code to make it increment by 1 for each new variable. The way it is now it seems i would have to write my actionscript like this:

function testCall() {
loadText = new LoadVars();
loadText.load("TextFiles/RetailAddress.txt");
loadText.onLoad = function(success) {
if (success) {
RetailAddress_txt.text = "";
RetailAddress_txt.html = true;
RetailAddress_txt.htmlText = this.RetailAddressVariable;
}
};
}
function testCall1() {
trace("Called !");
loadText = new LoadVars();
loadText.load("TextFiles/RetailAddress.txt");
loadText.onLoad = function(success) {
if (success) {
RetailAddress_txt.text = "";
RetailAddress_txt.html = true;
RetailAddress_txt.htmlText = this.RetailAddressVariable1;
}
};
}
function testCall2() {
loadText = new LoadVars();
loadText.load("TextFiles/RetailAddress.txt");
loadText.onLoad = function(success) {
if (success) {
RetailAddress_txt.text = "";
RetailAddress_txt.html = true;
RetailAddress_txt.htmlText = this.RetailAddressVariable;
}
};
}
function testCall3() {
trace("Called !");
loadText = new LoadVars();
loadText.load("TextFiles/RetailAddress.txt");
loadText.onLoad = function(success) {
if (success) {
RetailAddress_txt.text = "";
RetailAddress_txt.html = true;
RetailAddress_txt.htmlText = this.RetailAddressVariable1;
}
};
}


But wisdom is telling me that if i have 100 retailers, it dosent look to be the wisest of options too place testcall1-100 throughout my actionscript, and have an extremely long set of code. Im looking to increment the testcall by 1 in my text files, so that flash knows to go to the next retailer. I hope you understand what it is im saying. Thank you for your help thus far. Much appreciated.
November 20, 2006
Instead of accessing directly,
You just give the instance name of the movieclip in which you are having the text feilds.
Suppose, you are having a text Feild inside a movieclip with the name "my_mc".
then ,
_root.my_mc.RetailList_txt = "text".
fanmap81Author
Known Participant
November 18, 2006
im trying to use that revised code, but its not working. It works in your file, but not in mine. Is it because my textboxes are inside of two movieclips and not the root? If this is the case, how do i alter the code for it to work, because i tried _root. in a few places, with no success.
November 17, 2006
hi
just try this code.
it may help you...

http://development.agriya.in/test/Files.rar
fanmap81Author
Known Participant
November 16, 2006
November 16, 2006
hi,
the link is not working......... :(