Jump to content


Input text to URL


  • You cannot reply to this topic
4 replies to this topic

#1 Phatmat

    Young Padawan

  • Members
  • Pip
  • 6 posts

Posted 25 June 2007 - 03:30 AM

Hi, if you can help me on this please do so :firefox:

Ok, to start off, here is what I need to do (I am a flash newbie). I have this URL:

http://www.google.com/translate?langpair=e...ot;MY_URL"

What I need to do, is create a input text box in my flash document, that when someone enteres for example "www.myspace.com" and clicks GO, it will put "www.myspace.com" where it says "MY_URL" (above). So the full URL would they would be taken to would be:

http://www.google.com/translate?langpair=e...www.myspace.com

I need this not only for myspace, but for any site they enter, maybe "www.friendster.com",or any site.

The purpose of this is to try and bypass my school blocking proxy, and I think my idea should work :whoosh[1]:

Please help me asap, thanks!
Matt.

#2 Ben

    P2L Jedi Master

  • Publishing Betazoids
  • PipPipPipPip
  • 1,366 posts
  • Gender:Male
  • Location:VIC, Australia

Posted 25 June 2007 - 07:20 AM

getURL("http://www.google.com/translate?langpair=en|en&u="+inputField.text, "_blank");
:whoosh[1]:

#3 Phatmat

    Young Padawan

  • Members
  • Pip
  • 6 posts

Posted 25 June 2007 - 08:41 AM

sorry, but im a complete noob in actionscript.

what would I have to do with this?

so far I can/have:

1) Made my input text bar
2) Given it the name url_input
3) Now what?

thanks :huh: , im slowly getting there!

#4 Pax

    P2L Jedi

  • Members
  • PipPipPip
  • 911 posts
  • Gender:Male
  • Location:Windsor, ON, Canada

Posted 25 June 2007 - 09:31 AM

make a movieclip (to use as a button).

Make it whatever shape/size you like.

Inside the movieclip, make a new layer and name it actions. In the first frame of the layer put the code:

this.onRelease = function(){
getURL("http://www.google.com/translate?langpair=en|en&u="+_parent.url_input.text, "_blank");
}

That should work...give it a try. The button movielcip will have to be on the same timeline as the text field for that code to work.

#5 Phatmat

    Young Padawan

  • Members
  • Pip
  • 6 posts

Posted 26 June 2007 - 08:13 AM

It works GREAT!!!

Thanksyou all so much.

If you would like to view my new website with the fresh coded flash please visit:

www.scienceprofile.vze.com

It's a games website designed to be played at schools, where the word "games" is banned in the URL so i figured why not make a site on science :angrylooking: . Enjoy! (click my ADS if you are interested, help support me!)

regards,
Matt.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users