0 Replies Latest reply on Apr 29, 2007 4:59 PM by JAF Site Design

    Web Proxy using Flex 2?

    JAF Site Design
      Hey everyone,

      I'm trying to create a proxy service similar to sites like proxy7.com in Flex, but I'm having extreme difficulties. Right now I just want to get the basics, so I'm trying to load basic sites like google.com. Here is the script I have so far:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" width="50%" height="50%">
      <mx:HTTPService id="loadSite" method="get" />
      <mx:State name="sent" >
      <mx:SetProperty target="{panel1}" name="height" value="95%"/>
      <mx:SetStyle target="{panel1}" name="borderColor"/>
      <mx:AddChild relativeTo="{panel1}" position="lastChild">
      <mx:TextArea creationComplete="getPage.send()" id="siteDisp" top="43" right="10" bottom="10" left="10" htmlText="{getPage.lastResult.toString()}" />
      <mx:Panel width="95%" height="85" layout="absolute" verticalCenter="0" horizontalCenter="0" title="Josh's Proxy" id="panel1" resizeEffect="Resize" >
      <mx:TextInput id="urlin" top="10" left="10" right="70" editable="true" text="Enter URL here..." focusIn="if(urlin.text == 'Enter URL here...'){ urlin.text = ' http://' }" height="25"/>
      <mx:Button label="Go" width="50" right="10" top="10" height="25" click="getPage.send()" id="button1" />
      <mx:HTTPService id="getPage" url="{urlin.text}" resultFormat="text" showBusyCursor="true" result="currentState='sent'" />


      It starts to work a little bit, but all it returns is "Google". Any suggestions?