[Mapserver-users] what to do w/ ming swf's?
Grant, Ryan
rgrant at nrcan.gc.ca
Wed Apr 23 16:07:41 PDT 2003
Hey Charlton,
I've been working a little with swf output, so I'll do my best to share what
I know. The ####.swf that you refer too is indeed a control file. However,
it does not start an animation, it simple contains some actionscript that
holds info about your returned layers (the *_layer_*.swf's).
For instance, you would load the first swf file into your timeline:
loadMovieNum("1051023629262321.swf",10);
Once it is loaded, there will now be an object named mapObj that contains
info, such as the name, width, etc. You can get access to these properties:
var mapName = _level10.mapObj.name;
It also contains an array of the returned layers. These layers themselves
have properties such as name, relative name, etc. You can also access there
properties:
var layerName0 = _level10.mapObj.layers[0].name;
Using the "relativeName" property of the layer, you can load the layers into
movieclips on your timeline:
MyMovieClipLayer.loadMovie(_level10.mapObj.layers[0].relativename);
Once you have all the layers loaded into seperate movie clips, you should be
able to have some animations run.
I hope this helps clear things up a little.. feel free to contact me for
more info.
Ryan Grant
rgrant at nrcan.gc.ca
-----Original Message-----
From: Charlton Purvis [mailto:cpurvis at asg.sc.edu]
Sent: Tuesday, April 22, 2003 8:15 AM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] what to do w/ ming swf's?
Hi, folks:
I'm moving into new territory (for me) w/ animation, and I can't wrap my
hands around exactly what the resulting .swf's are.
I have two layers in my .map file: one is a raster of elevations, and
the other is are bathymetry lines (LINE). When I plug in the following
to my .map file:
IMAGETYPE swf
OUTPUTFORMAT
NAME swf
DRIVER "SWF"
MIMETYPE "application/x-shockwave-flash"
EXTENSION "swf"
FORMATOPTION "OUTPUT_MOVIE=MULTIPLE"
END
I end up w/ three .swf's in my tmp directory.
1051023629262321.swf 22-Apr-2003 11:11 1k
1051023629262321_layer_0.swf 22-Apr-2003 11:11 78k
1051023629262321_layer_1.swf 22-Apr-2003 11:11 96k
The *_layer_*.swf's are what I would expect, but I thought that the
####.swf would be something like a control file: click on that, and
away the animation would go (from layer_0 to layer_1). Yes, this is a
bad example, but it seemed simple, in theory. But if I click on it, it
produces a blank screen (no errors -- just a blank screen that opens in
a flash player).
Along those same lines, since I want to end up w/ an animation (layer_0,
pause, layer_1, repeat), am I going about it correctly? Am I
misunderstanding what the ####.swf does and/or can I peek at the
####.swf's contents somehow?
I've used
http://www2.dmsolutions.ca/mapserver/dl/FlashMapserverUserDoc.html as a
guide. Everything works -- I just want to understand what I've got!
Thanks.
Charlton Purvis
(803) 777-8858 : voice
(803) 777-8833 : fax
cpurvis at sc.edu
Advanced Solutions Group
Department of Physics and Astronomy
University of South Carolina
Columbia, SC 29208
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list