Solved

Loading source URL to a variable...

Posted on 2004-04-08
6
189 Views
Last Modified: 2010-04-03
Hello,
I'm trying to download a URL to a variable, like downloading the source…
The site contains information that the flash needs to get and process.
Since it's not mine I can't change it to the Load Variables () format… i.e. – myText = .
So basically I want to download the HTML source.
Perhaps one of the new components in MX 2004 does it…
Any ideas?
0
Comment
Question by:SiCkness
  • 2
6 Comments
 
LVL 9

Expert Comment

by:krishnaprathab
ID: 10790151
Hi,

 Can you be more specific and explain in more detail what you are exactly trying to do?

Thanks,
KP
0
 
LVL 9

Expert Comment

by:OBCT
ID: 10791717
If your trying to get the HTML source from a page, it can't be done in Flash.
This would be a simple process in Java using a DataInputStream but it gets complicated when trying to send the streamed data to Flash.

I agree with krishnaprathab. You'll need to give a better explanation.

Cheers

-OBCT
0
 

Author Comment

by:SiCkness
ID: 10793704
hmm can't be done?
well I know you can do it in VB using the  INET control.....
it's not that hard to understand
the source of an HTML, is the only place I can to extract information out......
after I process it . (Remove tags and stuff), i'll have it...

get the source of an HTML, preety understandable.. :)

I acctualy got something going with the GetVars class. but it was stupid...
anyway..
I hope I cleard it up
0
 
LVL 9

Accepted Solution

by:
OBCT earned 70 total points
ID: 10795317
The better explanation was just for us to be sure we're giving you the right advice :)

I've never been a big fan of VB but it's probably the best way to go in this case.
If your able to do this using .NET then you should try writtin an asp page that gets the HTML source, then posts it for Flash to read.
This may also be possible using PHP or other server side languages, so have a look around and pick your favourite language.

Once you've got the HTML source as a readable variable, it's very easy for Flash to read that and use it as it's own variable.

var reader = new LoadVars();
reader.onLoad = function(success)
{
    if (success)
    {
        trace(reader.varName);
    }
    else
    {
        trace("Error loading page");
    }
}
reader.load("http://www.website.com/yourPage.asp");

The LoadVars class will do all the hard work for you.
Let me know if you have any more questions :)

Cheers

-OBCT
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question