2 Replies - 2486 Views - Last Post: 07 July 2012 - 03:38 AM

#1 bdmullin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 15-April 11

AS3 Grab HTML from a website into String?

Posted 10 June 2012 - 04:19 AM

Hey guys, I am new to AS3 (actually developing mobile apps with flex in Flash Builder) and when I say new I mean a few days. I wrote a program in C# and want to turn it into a mobile app in flash builder. The part where I am struggling is grabbing the source html of a website and turning into a string. In C# the code I have is:
System.Net.WebClient webClient = new System.Net.WebClient();
string strSource = webClient.DownloadString(URL);
webClient.Dispose();
return strSource;

I have been reading about urlloader and urlrequest but not able to put anything together yet. Any help appreciated, not looking for the easy way out and it isn't a school project. Just fun.

Is This A Good Question/Topic? 0
  • +

Replies To: AS3 Grab HTML from a website into String?

#2 bdmullin  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 26
  • Joined: 15-April 11

Re: AS3 Grab HTML from a website into String?

Posted 10 June 2012 - 03:26 PM

No responses yet... if it helps I can post some as3 code or links to similar work. I am just not sure what the next step is or where to start.
Was This Post Helpful? 0
  • +
  • -

#3 huzi8t9  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 23
  • View blog
  • Posts: 326
  • Joined: 11-July 07

Re: AS3 Grab HTML from a website into String?

Posted 07 July 2012 - 03:38 AM

View Postbdmullin, on 10 June 2012 - 11:26 PM, said:

No responses yet... if it helps I can post some as3 code or links to similar work. I am just not sure what the next step is or where to start.


I'm no AS3 guru, but I am well equip for AS2 and know that you can use LoadVars to view a website, if you using the [LoadVarsVar].onData(data:String). I searched for the equivalent which would be the URLLoader - you can find the official documentation on it here.

Hope it helps

~huzi
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1