7 Replies Latest reply on Jul 20, 2007 2:15 PM by Newsgroup_User

    Works in flash but not on the web

    Optikalefx Level 1
      I have this admin page of my website. And it runs some complicated php script to determine if a button is visible or not, as well as grab user info and parses it into 3 textboxes. Flash will either display or not display the button, but always show the info in the text boxes.

      it works just fine when i test movie. but when i test it online its all blank, the button and the textboxes. i have the text to allow html and embedded the fonts. i also tried it without embedding the fonts and it still wont work. any ideas??
        • 1. Re: Works in flash but not on the web
          Level 7
          Hi Optikalefx,

          I'm not sure I have enough details to give you an absolute answer but
          my first guess would be that the PHP script is not being triggered due
          to cross-domain security. Put an "allow-all" crossdomain.xml file into
          the root directory of your web server and see if that works. The most
          general one to use, which allows access from anyone anywhere, is:

          <?xml version="1.0"?>
          <!DOCTYPE cross-domain-policy SYSTEM
          " http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
          <cross-domain-policy>
          <allow-access-from domain="*" />
          </cross-domain-policy>

          If that doesn't work for you then you'll need to share your source code
          because the issue runs deeper.

          Regards,
          Patrick

          --
          http://www.baynewmedia.com
          Faster, easier, better...ActionScript development taken to new heights.
          Download the BNMAPI today. You'll wonder how you ever did without it!
          Available for ActionScript 2.0/3.0.

          Optikalefx wrote:
          > I have this admin page of my website. And it runs some complicated php script
          > to determine if a button is visible or not, as well as grab user info and
          > parses it into 3 textboxes. Flash will either display or not display the
          > button, but always show the info in the text boxes.
          >
          > it works just fine when i test movie. but when i test it online its all
          > blank, the button and the textboxes. i have the text to allow html and
          > embedded the fonts. i also tried it without embedding the fonts and it still
          > wont work. any ideas??
          >


          • 2. Re: Works in flash but not on the web
            Optikalefx Level 1
            i dealt with crossdomain once, b4, when i was using flash on my website loading photos from flickr using xml

            but my flash file and my php files and the database are all on the same server...
            i found out that the dynamic text boxes work. the source code is :

            assign_btn._visible = false;
            myVar = new LoadVars();
            myVar.onLoad = function(success) {
            if (success) {
            email.htmlText = myVar.email;
            phnumber.htmlText = myVar.phnumber;
            voted.htmlText = myVar.voted;
            if (myVar.assign == "yes") {
            assign_btn._visible = false;
            } else {
            assign_btn._visible = true;
            }
            }
            };
            myVar.load(" http://www.4tenproductions.com/gary/file.php", "myVar", "POST");
            assign_btn.onRelease = function() {
            _parent.cover._visible = false;
            };

            the problem lies within the loadVars
            could cross domain still somehow me an issue?

            • 3. Re: Works in flash but not on the web
              Level 7
              Hi again,

              I had a look at that PHP address and it seems to not exist. Are you
              sure the script is actually there?

              http://www.4tenproductions.com/gary/file.php

              Patrick

              Optikalefx wrote:
              > i dealt with crossdomain once, b4, when i was using flash on my website loading
              > photos from flickr using xml
              >
              > but my flash file and my php files and the database are all on the same
              > server...
              > i found out that the dynamic text boxes work. the source code is :
              >
              > assign_btn._visible = false;
              > myVar = new LoadVars();
              > myVar.onLoad = function(success) {
              > if (success) {
              > email.htmlText = myVar.email;
              > phnumber.htmlText = myVar.phnumber;
              > voted.htmlText = myVar.voted;
              > if (myVar.assign == "yes") {
              > assign_btn._visible = false;
              > } else {
              > assign_btn._visible = true;
              > }
              > }
              > };
              > myVar.load(" http://www.4tenproductions.com/gary/file.php", "myVar", "POST");
              > assign_btn.onRelease = function() {
              > _parent.cover._visible = false;
              > };
              >
              > the problem lies within the loadVars
              > could cross domain still somehow me an issue?
              >
              >
              >

              --
              http://www.baynewmedia.com
              Faster, easier, better...ActionScript development taken to new heights.
              Download the BNMAPI today. You'll wonder how you ever did without it!
              Available for ActionScript 2.0/3.0.
              • 4. Re: Works in flash but not on the web
                Optikalefx Level 1
                yea i changed the address because my php file has all my database login info.

                the problem cant be the php file, because when i test movie it works just fine.
                its only when i bring it onto a server online and test it that loadVars wont work
                • 5. Re: Works in flash but not on the web
                  Level 7
                  Okay, I'll have to trust you that the PHP file exists. Try this...grab
                  yourself a web debugging proxy like Charles
                  ( http://www.xk72.com/charles/) or Fiddler
                  ( http://www.fiddlertool.com/fiddler/). Charles works directly in all
                  browsers (you may just have to update the proxy address, usually
                  localhost on port 8888 or 8080), Fiddler needs minor path settings to
                  run in FireFox
                  ( http://nil.checksite.co.uk/index.cfm/2006/4/12/Using-Fiddler-with-Firefox)
                  but works automatically in IE. Charles is a bit easier to use so I'd
                  recommend it but they both do the same thing.

                  Now run your proxy and your web browser...verify that the proxy is
                  actually processing all your requests. Clear out the request list
                  (CTRL-A, DELETE), and open up the page with the SWF. You'll probably see
                  the request for the crossdomain.xml file...just make sure it looks okay.
                  Then browse down the list until you see your PHP request. The debugger
                  will display the request, request code (200, 404, etc.) and the
                  response. In Charles this is all visible directly, in Fiddler you have
                  to double-click on the request to see the response.

                  What do you see when you do this?

                  Patrick

                  Optikalefx wrote:
                  > yea i changed the address because my php file has all my database login info.
                  >
                  > the problem cant be the php file, because when i test movie it works just fine.
                  > its only when i bring it onto a server online and test it that loadVars wont
                  > work
                  >

                  --
                  http://www.baynewmedia.com
                  Faster, easier, better...ActionScript development taken to new heights.
                  Download the BNMAPI today. You'll wonder how you ever did without it!
                  Available for ActionScript 2.0/3.0.
                  • 6. Re: Works in flash but not on the web
                    Optikalefx Level 1
                    hey both of your your links are dead. they both bring up file not found.

                    and just to note, any program that you might have me get, you need to know that im on a mac, so no exe s.

                    ok so i tried using loadVariables instead of loadVars the button that is supposed to show up actually did show up.

                    what happens in the script is that it makes the button invisible, and then runs the script to determine if the button should be there or not. using loadVars nothing happens. using loadVariables the button flashes, and then waits 2 seconds (when u use loadVariables u have to give it time to load in the variables) the button actually does show up. but the dynamic text fields dont load the data

                    something is wrong with loading variables in flash. what could be the EFFING problem.


                    • 7. Re: Works in flash but not on the web
                      Level 7
                      Well, at this point I can't offer you any more help. I'm afraid that
                      with the Macintosh you will be limited in your options. Unless you
                      manage to find a web debugging proxy and figure out why these links are
                      being blocked, you're just randomly stabbing at the problem. I've
                      verified on three separate networks (a wireless, intranet, and WAN) and
                      the links I sent you are valid. I don't know which PHP file you're
                      working with right now but I can tell you that the one you sent previous
                      doesn't exist.

                      If you have access to a PC, I highly recommend you get on it and try to
                      install Charles or Fiddler. There's a reason why data is being so
                      selective but, like I said, your current computer may not be able to
                      offer up any more information. I spent over a year working on a
                      Macintosh as a Flash developer and I feel your pain. It was the most
                      frustrating experience I've had in my professional life. I'm always
                      surprised that people are actually willing to pay a premium in exchange
                      for having one hand tied behind the back. Oh well...best of luck. If you
                      think of anything else that you think may be the cause, let me know.
                      I'll try to help from my end.

                      Patrick


                      Optikalefx wrote:
                      > hey both of your your links are dead. they both bring up file not found.
                      >
                      > and just to note, any program that you might have me get, you need to know
                      > that im on a mac, so no exe s.
                      >
                      > ok so i tried using loadVariables instead of loadVars the button that is
                      > supposed to show up actually did show up.
                      >
                      > what happens in the script is that it makes the button invisible, and then
                      > runs the script to determine if the button should be there or not. using
                      > loadVars nothing happens. using loadVariables the button flashes, and then
                      > waits 2 seconds (when u use loadVariables u have to give it time to load in the
                      > variables) the button actually does show up. but the dynamic text fields dont
                      > load the data
                      >
                      > something is wrong with loading variables in flash. what could be the EFFING
                      > problem.
                      >
                      >
                      >
                      >

                      --
                      http://www.baynewmedia.com
                      Faster, easier, better...ActionScript development taken to new heights.
                      Download the BNMAPI today. You'll wonder how you ever did without it!
                      Available for ActionScript 2.0/3.0.