7 Replies Latest reply on Apr 27, 2006 1:06 AM by Josh_Langley

    preloadNetThing and a php dynamic image script

    Josh_Langley
      I have a php script which generates an gif image based on some GET variable. which is called like this for example:
      ' http://whatever/bitmapPixel.php?color=00ff00'
      now if it is downloaded and cached how do I reference the member filename property? When I use the above url as the member filename property it errors when my script references the member . The member is in the cast but no filename is attached.
      I have tried using ' http://whatever/pixel.png' just to test if there is a problem with my script and it works fine.

        • 1. Re: preloadNetThing and a php dynamic image script
          Level 7
          preloadNetThing downloads to shockwave's private cache, I don't see a
          benifit in using it with browser resoures.
          • 2. Re: preloadNetThing and a php dynamic image script
            Josh_Langley Level 1
            quote:

            Originally posted by: Newsgroup User
            preloadNetThing downloads to shockwave's private cache, I don't see a
            benifit in using it with browser resoures.


            I need to apply different textures to a 3d model during runtime. The script at the moment just outputs a colored pixel depending on the GET value.
            I have no idea what your talking about when you said browser resources, even though it's a URL, the php script outputs an image file.
            Is there any way to dynamically create an image, import it as a member, then apply the member to a model texture?
            • 3. Re: preloadNetThing and a php dynamic image script
              James Newton, ACP Level 3
              In similar circumstances, I succeeded in setting the filename of a bitmap member to a URL which generated an image on the fly via a PHP script. The secret was to start with a bitmap member which was already linked to a dummy external file. If I tried to set the filename of a standard (non-linked) bitmap member, no image was imported.

              Does this match with your situation?
              • 4. Re: preloadNetThing and a php dynamic image script
                Josh_Langley Level 1
                quote:

                Originally posted by: openspark
                In similar circumstances, I succeeded in setting the filename of a bitmap member to a URL which generated an image on the fly via a PHP script. The secret was to start with a bitmap member which was already linked to a dummy external file. If I tried to set the filename of a standard (non-linked) bitmap member, no image was imported.

                Does this match with your situation?

                Yes I thinkn it does, when I was testing I think that's what I did to get a test script working, but I had totally forgotten about it. I'm pretty sure that will work, I'll give it a go and let you know how I went.

                • 5. Re: preloadNetThing and a php dynamic image script
                  Josh_Langley Level 1
                  quote:

                  Originally posted by: openspark
                  In similar circumstances, I succeeded in setting the filename of a bitmap member to a URL which generated an image on the fly via a PHP script. The secret was to start with a bitmap member which was already linked to a dummy external file. If I tried to set the filename of a standard (non-linked) bitmap member, no image was imported.

                  Does this match with your situation?

                  Yep, this sure is the solution, thanks a heap. ^_^ For others just remember the image has to be cached by the client first using preloadNetThing or when you reference the image it might not work.


                  • 6. Re: preloadNetThing and a php dynamic image script
                    Josh_Langley Level 1
                    Hey did you manage to publish the file you made as a dcr file? I have run into problems when I tried to publish it.
                    • 7. preloadNetThing and a php dynamic image script
                      Josh_Langley Level 1
                      Okay I made a test file,I am able to make and run the dcr file but the dynamic images must not work, Once the dynamic images are generated they should be applied to a 3d model as a new texture to change the color. But when I run it in a browser no color changes occur which leads me to believe it is not properly referencing via the filename property. Anyone got any ideas?
                      Added - This same thing occurs every now and then in the debugger. But always when the dcr file is run.