Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Loading source URL to a variable...

Posted on 2004-04-08
6
Medium Priority
?
217 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
4 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 280 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
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…
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
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.

578 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