Solved

Loading source URL to a variable...

Posted on 2004-04-08
6
206 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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…
Sometimes you know that one object has a specific child in it, but you can't find the child. This happened to me when I was trying to code some actionScript to make a toolbar work with its embedded buttons.  My partner had created the toolbar usi…
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 how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

717 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