transparency flash movie OUTPUT_MOVIE=SINGLE/MULTIPLE

Richard Duivenvoorde richard at DUIF.NET
Wed Apr 6 03:16:23 EDT 2005


Hi Kristjan,

Consider the problem of progressive JPG's solved :-)

from my mapfile:

OUTPUTFORMAT
   NAME jpeg
   MIMETYPE "image/jpeg"
   DRIVER "GD/JPEG"
   IMAGEMODE RGB
   FORMATOPTION "QUALITY=80"
   FORMATOPTION "INTERLACE=OFF"
END

(actually the line FORMATOPTION "INTERLACE=OFF")

makes mapserver producing non-progressive aka non interlaced output
which can be used in flash.

I'm already combining swf and jpeg's from a mapserver in a flash client,
but have some transpency problems when I use the SINGLE option, and
positioning problems (the swf always is going to the 0,0 of _root...)
when using the MULTIPLE option.

If someone has an example/idea for those problems...

Richard

Kristjan Annus wrote:
> I wanted to do just the same thing as you, to have some base map and
> some layers in vector flash format with some
> tooltips and onmouseower coloring etc. For point data it is easy to use
> xml instead of SWF, but if you want to show some polygons, or lines,
> then it is more complicated.
> And there's one more problem to this solution. The Mapserver produces
> progressive JPG output, and Flash does not support
> progressive JPG input (at least it was what I figured out). So we have
> some nice problems on every step :-)
>
> Kristjan
>
>> Hi,
>>
>> sorry, I thought you had troubles with the image size (instead of the
>> file size). I think a swf file is always bigger, because it contains
>> more information? (haven't tried it with layers in my app...)
>>
>> But that is exactly the reason I opt for a mixed application: for
>> background/reference map's I want to use images, but for points of
>> interest (POI's) I want to use a (small) swf files.
>>
>> Other options are to retrieve xml instead of swf, and use the
>> information from this xml to put POI's on your movie runtime. Why
>> would you use swf maps anyway if you do not want to do something with
>> (parts) of the data?
>>
>> Richard
>>
>> Kristjan Annus wrote:
>>
>>> Hi,
>>>
>>> the link you sent me is usable only from your own computer, so I cant
>>> see it.
>>> I'll send you a link from my Flash test application (player 7 required).
>>>
>>> http://www.tartu.ee/bi_kaart/tarkvarastuudio.html
>>>
>>> The opening page swf map file is about 100k in size. The same picture in
>>> jpg format in the same application is ~33k.
>>> I use it in another flash movie, but every time when the client is
>>> zooming a map he has to download about 100-300k
>>> new map image.
>>>
>>> Kristjan
>>>
>>>>
>>>> Kristjan,
>>>>
>>>> Thanks I think you're right, I can try to make the bitmap (which is
>>>> actually a call to another OGC mapserver) part of the mapserver
>>>> mapfile. The mapserver then becomes a cascading mapserver?
>>>>
>>>> Don't know how you call the mapserver, but my swf's are exactly the
>>>> same size as the images I request. I use calls like:
>>>> "http://localhost/cgi-bin/mapserv.exe?map=fnl.map&mode=map&mapext=-20000%20300000%20300000%20620000&mapsize=300%20300"
>>>>
>>>>
>>>>
>>>> which returns a flashmovie of 300x300 to me IF you open the movie in
>>>> the flashplayer. Opening it in a browser shows it indeed 5 times the
>>>> normal size, but using it in another flashmovie is ok.
>>>>
>>>> Richard
>>>>
>>>> Kristjan Annus wrote:
>>>>
>>>>> I don't know about seting transparent backgrounds if swf output,
>>>>> but one
>>>>> solution for you is to put your bitmap background image also to
>>>>> your map
>>>>> file, and create one single swf output for all of your data.
>>>>>
>>>>> But I have encountered one problem with mapserver FLASH output too,
>>>>> thats the size of the swf file, when you use OUTPUT_MOVIE=SINGLE
>>>>> option.
>>>>> In my case it was about 2-5x of the file size of the same output in
>>>>> jpg
>>>>> format.
>>>>> Does anybody know is there some way to decrease the swf output file
>>>>> size?
>>>>>
>>>>> Kristjan
>>>>>
>>>>>> Hi List members,
>>>>>>
>>>>>> using the mapserver (two layers) swf/flash output I tried both format
>>>>>> options:
>>>>>> FORMATOPTION "OUTPUT_MOVIE=MULTIPLE"
>>>>>> FORMATOPTION "OUTPUT_MOVIE=SINGLE"
>>>>>>
>>>>>> Using the first one returns an 'index'-swf from which I can get
>>>>>> the two
>>>>>> layer swf's. This results in 'transparent' movies, that is I can
>>>>>> show a
>>>>>> bitmap behind the movie in the flashplayer.
>>>>>>
>>>>>> When using output SINGLE, I receive the right features, but on an
>>>>>> non-transparant (white) background (without changing any other
>>>>>> option in
>>>>>> the mapfile)?
>>>>>>
>>>>>> Question:
>>>>>> - does anyone know IF it is possible to make the SINGLE output movies
>>>>>> transparent?
>>>>>> - If yes, please tell me how?
>>>>>> - Is there another way, then delving in the mapserver cpp code, to
>>>>>> influence the code within the mapserver-returned-swf-files (for
>>>>>> example
>>>>>> to influence _root or using _parent references)?
>>>>>> - Is there other flash-output specific documentation other then: the
>>>>>> fmv
>>>>>> flashexample: http://mapserver.gis.umn.edu/user_utilities/fmv.zip?
>>>>>>
>>>>>> Thanks in advance,
>>>>>>
>>>>>> Richard
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>>
>
>



More information about the mapserver-users mailing list