A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Loading Variables From Yahoo..

  1. #1

    resolved

    Hello all.
    Let me get right to it. I'm trying to make a little utility that will search Yahoo's chat service for the specified user and then return the information in a text box. The URL to search for an online user is:

    http://onlinesearch.yahoo.com/chat/index.html

    "p" is the variable defining the username to search for. The problem is this: I don't want to open a browser window to search for this, because I think that looks tacky. What I'd like to do is load the variables from the HTML document through loadVariables. Is there any way to do this? Is there an easy way to do this through XML? If anyone has any ideas I'd appreciate them Thanks!

  2. #2
    Senior Member
    Join Date
    Mar 2000
    Posts
    584
    Don't bother with the index.html.


    We'll call the user defined search name variable: username. Your visitor would enter the username into a text field in your flash movie, hit enter, activating the actionscript:
    Code:
    Load Variables: "http://onlinesearch.yahoo.com/chat?p=username"
    Then you'd have to do some processing of the returned data using some more actionscripting to cut out the info that you want. Probably more trouble than it's worth.

    Here's some of the html your action scripting would have to strip away to get at their variables:
    Code:
    <tr bgcolor=dcdcdc><td><a href="http://profiles.yahoo.com/matrix20in" target=pfl>matrix20in</a></td>
    <td>&nbsp;</td>
    <td>[<a href="http://chat.yahoo.com/chat/cmd?cmd=goto&args=matrix20in">GOTO</a>&nbsp;-&nbsp;<a href="http://chat.yahoo.com/chat/cmd?cmd=invite&args=matrix20in">INVITE</a>]</td></tr>
    <tr>
    <td><a href="http://profiles.yahoo.com/matrix24jo" target=pfl>matrix24jo</a></td>
    <td>&nbsp;</td>
    <td>[<a href="http://chat.yahoo.com/chat/cmd?cmd=goto&args=matrix24jo">GOTO</a>&nbsp;-&nbsp;<a href="http://chat.yahoo.com/chat/cmd?cmd=invite&args=matrix24jo">INVITE</a>]</td></tr>
    I think a pop up window isn't that tacky after all.

  3. #3

    resolved

    Thanks bannon. I see that it would be a lot of work, but it would look much more appealing to have the results of the search display dynamically in the projector itself rather than in a pop-up window. If this were going to be embedded in a web page, I could just display the result in another frame. I'm not worried about how much work it will be to strip away the HTML.. I have an idea for that. It's making it load ANYTHING that I'm frustrated with. Nothing I do seems to work. It won't even load the HTML you just pasted up there. After hitting enter, I see my DSL Router blinking so I know it's sending information and trying to receive some, but nothing loads into my text field. I must be doing something wrong, so could someone tell me how to correct this?
    Code:
    on (keyPress "<Enter>") {
        loadVariablesNum ("http://onlinesearch.yahoo.com/chat?p=" add query, 0, "POST");
    }
    "query" is the username you're searching for. So is it incorrect to do it this way? I just need to know how to do it so that I will at least be able to load the entire page into my text field. Then at least I have something to work with Thanks for the help!

  4. #4
    Senior Member
    Join Date
    Mar 2000
    Posts
    584

    Hmm

    Unfortunately, I don't know Flash 5 actionscripting.

    However, if you're just looking for something to display, I would just use

    Get URL: "http://onlinesearch.yahoo.com/chat?p="&username

    Where the username is the data entered by the user and the '&' joins username to the URL seamlessly.




  5. #5
    Senior Member
    Join Date
    Oct 2000
    Posts
    157
    using LoadVariables, you won't be able to grab the data. If a body of text isn't preceeded by 'variable=' then it's just all dropped. If you're lucky you might catch some variables, but it's not formated like that, so you're probably outta luck. You can check to see if any variables are getting through by use List Variables.

    There may be a way to parse data in Flash 5, but not using Load Variables. You could also do it in Perl first I guess, but then you need your own server.

    - Tony

  6. #6
    Member
    Join Date
    Oct 2000
    Posts
    42

    Ah, Come Again?

    Is this some kind of JOKE?? Have you nothing better else to do with Flash? I mean, do you realize what your trying to do is hardly even worth the effort. (which by no means you'll ever achieve). Frankly, who gives a rats ass for Yahoo.


  7. #7

    resolved

    Frankly, OxBlood, I could give a "rat's ass" what you think about anything I do or attempt to do. Who are you to judge what others do just because you don't approve of it? Oh should I bow down to the almighty Flash programmer that is you? Should I spare this forum my boring and stupid ideas because you, "OxBlood Ruffin" say it's pointless? Perhaps I should search through the forums for your entries and post about how meaningless and stupid your ideas are. I find it rather pathetic that you would insult someone's idea just because you don't like it. What if I was making this for someone who was willing to pay for it? You've no idea what purpose I have for it, nor is it any of your concern. Hey.. I just got a great idea you might be interested in - get a life, don't prey on others' creations. Anyway, continuing with the real topic of this thread, I don't want to use Get URL as stated before because that would basically defeat the purpose of what I'm trying to do. The user could just as easily use their web browser. I do have my own server, but I don't know enough about Perl to write my own script for this. I think one of the variables sent (.done) might display the redirect URL and then all of the HTML on the new page, because I remember experimenting with it. I'll try it, but if anyone knows anything else, I'd be glad to hear about it. Don't be discouraged by the lack of intelligence that seems to be floating around the forums - it eventually evaporates

  8. #8
    absent
    Join Date
    Aug 2000
    Location
    NB, Canada
    Posts
    155
    Nice rant Supra...


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center