Welcome, Guest
  • Author Topic: how to load vars from url  (Read 1786 times)

    Alfredo

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    how to load vars from url
    « on: 02/23/04, 12:59 »
    I want my application to load some vars from the url that its called.

    For instance:
    To call the app in this way: www.example.com/load.asp?var1=1&var2=2?var3=3
    And Flash to load var1=1, var2=2 and var3=3

    where var1, var2, var3 the names of 3 textboxes' var names.

    Is that possible?

    I'd really appreciate some help.

    Thanks,
    Al.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:how to load vars from url
    « Reply #1 on: 02/23/04, 17:40 »
    Hi Alfredo, welcome to the boards !

    Check this tutorial, it explanes how to load data from external sources: http://www.flash-db.com/Tutorials/loading/

    Jorge
    « Last Edit: 02/23/04, 17:40 by Jorge Solis »

    Alfredo

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:how to load vars from url
    « Reply #2 on: 02/24/04, 08:14 »
    Jorge,

    I've already read that tutorial and I found it very helpful, but not applicable in this case. I need to load vars directly from the url.

    But thanks anyway.
    Regards,
    Al.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:how to load vars from url
    « Reply #3 on: 02/24/04, 08:24 »
    Can you explain better your needs?

    Jorge

    Alfredo

    • Server what's that
    • *
    • Posts: 3
      • View Profile
      • Email
    Re:how to load vars from url
    « Reply #4 on: 02/24/04, 08:31 »
    Sure,

    Lets say I have a site and an application movie.swf.

    Everytime a user click to execute the application, I open a new window with an .asp file and the flash app runs into this window.

    I need to pass some variables from the asp to the swf, I would like to know if there's any way I can pass those variables in the url, I mean:

    www.mysite.com/app.asp?var1=1&var2=2&var3=3

    Can flash load the vars from a sentence like that?

    Am I clear enough?
    Please ask me if not.

    Thanks in advance,
    Al.

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re:how to load vars from url
    « Reply #5 on: 02/24/04, 10:09 »
    You can use flashvars to pass data to Flash dinamically, writing to the <object> tag. Check http://www.macromedia.com/support/flash/ts/documents/flashvars.htm

    Jorge