dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: "go" button reading a link from a textbox?

  1. #1
    Junior Member
    Join Date
    Feb 2002
    Posts
    22

    "go" button reading a link from a textbox?

    Is there a way to get a button to read the value in a text box and go to the link displayed? instead of just making it selectable and having the user open a a browser and paste the link ?

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    you can set the textbox to display html tags (from the properties inspector when the textbox is selected) then you can create your text from a variable,

    myText = "this is the text to appear in a textbox <a href=\"http://www.somehost.com\"><u>this is a link</u></a>";

  3. #3
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    on(release){
    getUrl(textbox);
    }
    If the url is the only thing displayed in the textfield.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  4. #4
    Junior Member
    Join Date
    Feb 2002
    Posts
    22

    Darn!

    The var is already being used because I am getting the link from a textfile. the one that pellepiano posted will not work. Any other ideas?

  5. #5
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Are you getting the whole of the text from the textfile? if so put the link in there

    &varName=some text and <a href="somefile.html"><u>a link</u></a>&

  6. #6
    Junior Member
    Join Date
    Feb 2002
    Posts
    22

    Thanks Pellepiano

    now I feel like a dummy. It worked the way you said, i just used the var that the textfile was writing to. I was thinking i couldn't change it to another var or the link would never write. I later tought..."Hmm, why change it, just use the same var." So i did..and it worked. typical noob later

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center