dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Loading variables from http

  1. #1
    Junior Member
    Join Date
    Oct 2002
    Posts
    14

    Loading variables from http

    Im deploying a menu with 3 levels and Im having some difficult in transmit the menus status to the next page.

    Im passing the variables to the next page through the links: ( i.e.: link1.asp?nurl=1 )

    I have a function which tests the variable nurl at the menu and, depending on the value it mounts the menu with the status I need.

    i.e.:
    loadVariables ("http://localhost/pass/passing.html", 0);

    if (nurl == 1){
    gotoAndStop (2);
    }else if (nurl == 2){
    gotoAndStop (3);
    }else if (nurl == 3){
    gotoAndStop (4);
    }

    But, the movie is not loading the variable from the http. How could I get the variable directly from the http header?

    Since now, many thanks for any help.

    may you see the example menu on http://lacqua.lazo.com.br

    Icaro

    NaN

  2. #2
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    the movie cannot read the url of the containing html, only anything inside the embedding.
    If you are loding a html page as
    test.html?var=value
    check this thread for a technique to transfer the value to flash http://www.flashkit.com/board/showth...hreadid=275953
    If you are loading a script page (ph, asp) in this way, the server script should add the variable to the embedding

    Musicman

  3. #3
    Junior Member
    Join Date
    Oct 2002
    Posts
    14

    New Problem

    Thank's Musicman, that's work but wen i click for the secound time the browser show the variables two times like this:

    http://localhost/pass/passing3.html?...l=3&variavel=2

    at have tried to change the method, but don't work too....

    :-(
    Attached Files Attached Files
    NaN

  4. #4
    Peace and good Vibes Pippomusic's Avatar
    Join Date
    Jan 2002
    Location
    Rome, Italy
    Posts
    169
    What i could see as a solution, is to put the page in a frame with an invisible html page, and use the invisible page as variable storage.

    Maybe putting some javascript inside to keep the variables the way you like....

    Sounds absurd but it works

  5. #5
    Registered User
    Join Date
    Feb 2001
    Posts
    13,044
    Hi,

    the buttons use loadvaribles with the GET option - so all current variables are tacked onto the url by flash. Now, when you come there the second time, you have a variable passed in and put one into your own request ... that makes two of them (with conflicting values)
    Get rid of those GET bits ... choose "no sending" or whatever it is called

    Musicman

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