Hi Yarif,

I  wished there was a better solution. I tried to send all kind of
http-headers with php, like
Header('Content-Type: image/png');
Header('Content-disposition: inline; filename=pcw.png');
in conjunction with a fpassthru($fp) command, no success. I even tried
to fool director with "fake" urls like
http://www.census.gov/cgi-bin/ipc/pcwpng?foo.png
same result. I think director really needs a real file ending, or maybe
a certain server configuration. well, writing this one idea comes to my
mind, if you have full admin access to a webserver and can use your own
.htaccess files, it could work if you put there an php-script which
receives urls
(as get-parameters, like
...?imgurl=http://www.census.gov/cgi-bin/ipc/pcwpng)
which it simply passes through:
<?php
$fp=fopen($_GET['imgurl'],'rb');
fpassthru($fp);
fclose($fp)
?>
without creating a local copy, and then rename this script to *.png (or
whatever your image-format is), and configure your webserver to
interprete all png-files in this directory as php-files. This could
work. You could even have 3 such renamed php-scripts, with file-endings
gif, jpg and png, and make the webserver interprete all of them as
php-scripts (only in this one directory).

If that's no solution for you, you could check if flash is able to
receive image data from CGIs, and if it does, use a flash-sprite to
display the images.

But in case your other project isn't shockwave-based, put based on a
projector, you can of course download the images, save them locally and
attach/import the local copies.

good luck,
valentin

Yariv Alter Fin wrote:
> Valentin hi,
>
> Thanks alot, its amazing and it works. it is abit of an overkill
> however... indeed in the case of the one image i've sent its a
> prefect solution, however i am working on another project that needs
> to get a whole bunch of images from a cgi script... i could create a
> php script that get sent the url of the original file and the name of
> the local copy. but is there absolutely no way of reading the
> original files directly in director, somehow adding the missing file
> ending or something like that? or otherwise is there any xtra that
> could help with this?
>
> again thanks for the solution,
>
> greetings to all (Alfred! Hi!)
>
> Yariv
>
>
>> I think the problem is that the png is dynamically generated by some
>> cgi-script, but director needs correct file-endings, mime-types in
>> the http-header don't seem to be sufficient. if you have acces to any
>> web-space with php-support, you can put there the following little
>> php-script ("pcw.php").
>>
>> <?php
>> copy('http://www.census.gov/cgi-bin/ipc/pcwpng','pcw.png');
>>>
>>
>> this creates a copy of the recent png in your web directory.
>>
>> now, whenever you want to update the png in your shockwave movie,
>> use a script like the following (eg. attached to an "update"-button):
>>
>> property pNetId
>>
>> on mouseUp me
>>     -- forces update of png
>>     pNetId = getNetText("http//domain/path/pcw.php")
>>     (the actorList).add(me)
>> end
>>
>> on stepFrame me
>>     if netDone(pNetId) then
>>         -- use random to fool cache. set randomseed in prepareMovie
>>
>> member("myPng").filename="http//domain/path/pcw.png?"&random(the
>>         maxinteger) updateStage()
>>         (the actorList).deleteOne(me)
>>     end if
>> end
>>
>>
>> valentin
>>
>>
>> Yariv Alter Fin wrote:
>>>  Dear List,
>>>
>>>    I am trying to download and link an online image file with my
>>>  shockwave movie. the image adderss is:
>>>  http://www.census.gov/cgi-bin/ipc/pcwpng . however, it wont link
>>>  unless i download it to a known place on my harddisk and link it to
>>>  the member from there. this offcourse i can't do from a shockwave
>>>  movie...  any idea's of how to be able to get this image into my
>>>  shockwave movie?
>>>
>>>
>>>  T.I.A,
>>>
>>>  regards,
>>>
>>>  Yariv Alter / alterFin
>>>  [To remove yourself from this list, or to change to digest mode, go
>>>  to http://www.penworks.com/lingo-l.cgi  To post messages to the
>>>  list, email [EMAIL PROTECTED]  (Problems, email
>>>  [EMAIL PROTECTED]). Lingo-L is for learning and helping with
>>>  programming Lingo.  Thanks!]
>>
>> [To remove yourself from this list, or to change to digest mode, go
>> to http://www.penworks.com/lingo-l.cgi  To post messages to the
>> list, email [EMAIL PROTECTED]  (Problems, email
>> [EMAIL PROTECTED]). Lingo-L is for learning and helping with
>> programming Lingo.  Thanks!]
>
> [To remove yourself from this list, or to change to digest mode, go
> to http://www.penworks.com/lingo-l.cgi  To post messages to the list,
> email [EMAIL PROTECTED]  (Problems, email
> [EMAIL PROTECTED]). Lingo-L is for learning and helping with
> programming Lingo.  Thanks!]

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email [EMAIL 
PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping 
with programming Lingo.  Thanks!]

Reply via email to