?
Solved

Loading source URL to a variable...

Posted on 2004-04-08
6
Medium Priority
?
209 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 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
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…
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 the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
Suggested Courses

770 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