Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 3 of 3
  1. #1

    Default Linking text to text?

    Ok, please tell me this can be done.

    I'd like to be able to have a link within a text field that will open a new text document in the same text field. Like opening a new page in the same browser window. Is there a way to do this using external files, or urls, anything? If you could either give me some code to work with or point me towards a tutorial I'd be extreamly grateful. I haven't found anything helpful anywhere else, and yet it seems like it would be an easy enough thing to do. Thank you in advance to anyone that can help.

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    May 2004
    Location
    U.S.A.
    Posts
    2,890

    Default

    Hi,

    It is pretty easy to do with buttons. You can use a LoadVars object to hold the data then populate that object with whatever text file you choose....

    Code:
    myVars = new LoadVars();
    myVars.onLoad = function(success) {
    	if (!Success) {
    		trace("Failed to load");
    	} else {
    		myTextfield.text = myVars.myText;
    	}
    }
    myVars.load("http://somesite.com/somefile.txt");
    //Load a different text file
    myButton.onRelease=function(){
    myVars.load("http://somesite.com/someOtherFile.txt");	
    }
    I'm not sure how you would use a text link in an HTML enabled textfield to call the load method. I dont think a getURL method will allow that, but I have not tried it.

    hope it helps
    NTD
    A mind once stretched by a new idea never regains its original dimensions.
    - Oliver Wendell Holmes

  4. #3

    Default

    Thank you so much! I'll try that!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. linking text to image
    By hdm in forum General Flash
    Replies: 1
    Last Post: 09-13-2006, 01:09 PM
  2. NO TEXT
    By yogibear in forum Newbies
    Replies: 1
    Last Post: 07-25-2006, 08:59 PM
  3. Find text within text
    By Shiroten in forum Flash Scripting
    Replies: 1
    Last Post: 04-17-2006, 01:47 AM
  4. Replies: 1
    Last Post: 03-11-2005, 07:55 AM
  5. loading a text file into a dynamic text field
    By dcox001 in forum General Flash
    Replies: 1
    Last Post: 12-11-2003, 05:13 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial