Solved

Loading source URL to a variable...

Posted on 2004-04-08
6
166 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
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 how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now