A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: loading variables into a projector

  1. #1
    Junior Member
    Join Date
    Aug 2000
    Location
    eu.rope
    Posts
    15
    hello

    i am trying to load variable text form PHP into a projector.

    loading variables from PHP into the swf works fine with this piece of code: _root.mc1.loadVariables("http://www.xy.com/variables.php3", 0, "POST");
    in the variables.php3, the variables are in the format &var1=dada&var2=blabla&

    now, when i export the project as a projector, it doesn't show me the variables. doesn't like projector variables? and how could it be helped? or what am i doing wrong? does anyone know?

    cheers mates
    lamb_retta

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    Adam Burtch (Flash Tech Support at MM) has done some research with the Flash team to figure this out and reported back to the community in macromedia.flash.

    Basically, POST doesn't always work from a projector file but there ARE situations where it will work (Adam mentioned them but I didn't scribble it down). GET is the golden child if you can pick and choose which method to use.

    You can search the old posts at macromedia.flash (forums.macromedia.com) for Adam's full response. I don't think it was more than a week ago that I saw this. If I find it first I'll post it in this thread for everyone to enjoy

  3. #3
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764
    I found it...

    -----POST & GET mystery [partially] explained-----

    Hi folks:

    With regard to folks using the POST method and getting a return code
    that the data has been requested via GET (despite the fact that the
    data does, in fact get sent properly) here's what the developers told
    me:

    ******
    The Flash Player ActiveX control can result in this GET/POST hybrid
    behavior for some, but not all, POST operations.

    The problem only manifests if the initial URL contacted by the POST
    operation performs a Redirect to another URL. The URL that the POST
    is redirected to will receive a GET request, not a POST request,
    except that the variables will still be contained in the content data
    like a POST rather than be appended to the URL like a GET.

    Example:
    1. A Flash movie sends POST to http://www.macromedia.com/foo.cgi
    2. The Web server on http://www.macromedia.com replies with
    a Redirect header:
    Redirect: http://www.macromedia.com/bar.cgi
    3. The user's machine receives the Redirect header from the
    server, and re-requests using the new URL:
    http://www.macromedia.com/bar.cgi
    When bar.cgi is requested, the HTTP request method will
    incorrectly be set to GET rather than POST.

    The problem will not occur if no Redirect is performed by the initial
    URL.

    Likely, the folks who are encountering this bug are using Redirects on
    their site.

    This affects only the Flash Player ActiveX control for all versions of
    Internet Explorer/Win. The Netscape plugins and standalone players
    are not affected on either Mac or Win or Unix.
    ******


    Sincerely,
    Adam Burtch
    Macromedia Tech Support/Flash
    -- Please reply to the newsgroup for the benefit of all.
    -- and PLEASE read the Flash newsgroup FAQ at
    http://www.macromedia.com/go/3535

  4. #4
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,764

    You can find more good info on the POST/GET (and related) problems by doing an advanced search of newsgroups at Google using the following parameters.

    subject: POST
    author: Adam Burtch
    group: macromedia.flash

    I suggest using Adam's name to weed out the questions since he replies to (and quotes) most of them anyway.

    If you don't read macromedia.flash on a regular basis, you should. There's quite a bit of volume and a lot of "newbie" posts but the occasional nugget pops up every now and then. Failing that, the Google newsgroup archives (formerly DejaNews) are a real treasure.

  5. #5
    Junior Member
    Join Date
    Aug 2000
    Location
    eu.rope
    Posts
    15

    Thumbs down neither get nor post -> i am lost

    thank you for your help

    but unfortunately it doesn't work with "get" either.
    funny enough, when i preview the flash player by pressing command + enter on the mac, it works. as well as if it would be a <html>swf</html> in my browser.

    it seems, that the projector doesn't "connect" to the net. therefore i ask whether the loadVariables("http://...") statement is enough to get a connection to the net?

    hm... i am really puzzled and i tried it on mac and pc_

    _retta

  6. #6
    Junior Member
    Join Date
    Aug 2000
    Location
    eu.rope
    Posts
    15

    would a xml socket do better?

    does anyone know, if xml or xml sockets would solve this problem? is anyone experienced with it?

    please let me know, before i head into undiscovered galaxies

    hasta pronto

    ramba_letta

  7. #7
    Junior Member
    Join Date
    Aug 2000
    Location
    eu.rope
    Posts
    15
    ... and it works, at least on most pcs except the one i am working with and my mac!!!
    it works with loadVariables - get or post in a projector.exe

    limbo_rosso


  8. #8
    Modding with Class JabezStone's Avatar
    Join Date
    Aug 2000
    Location
    Grand Rapids, MI
    Posts
    2,008
    retta,

    I am having a similar problem, and one question I am asking myself is whether the fact that I am behind a company firewall could be the culprit or not.

    Are you trying to connect via a company network/firewall?

  9. #9
    Junior Member
    Join Date
    Aug 2000
    Location
    eu.rope
    Posts
    15

    there is a firewall

    jabez

    yes, all machines i tried are behind a corporate firewall
    i really don't know what could be the problem_

    saludos
    retta

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