<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Simple shapefile drawing in ActionScript 3</title>
	<atom:link href="http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/feed/" rel="self" type="application/rss+xml" />
	<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/</link>
	<description>Adventures in cartography</description>
	<lastBuildDate>Tue, 24 Jan 2012 16:36:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Rafael</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-147218</link>
		<dc:creator>Rafael</dc:creator>
		<pubDate>Mon, 10 Oct 2011 03:42:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-147218</guid>
		<description>Hi,

First thank you for example. Very nice!

I need to change color border, but you use:
var cTrans : ColorTransform = new ColorTransform();
cTrans.color = 0×009933;
f.transform.colorTransform = cTrans;

This case chage all shape color, but i need to change only border(or lineStyle). Who do i do?


Thank you!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>First thank you for example. Very nice!</p>
<p>I need to change color border, but you use:<br />
var cTrans : ColorTransform = new ColorTransform();<br />
cTrans.color = 0×009933;<br />
f.transform.colorTransform = cTrans;</p>
<p>This case chage all shape color, but i need to change only border(or lineStyle). Who do i do?</p>
<p>Thank you!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-147001</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Tue, 04 Oct 2011 13:40:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-147001</guid>
		<description>Hi Andy,

Thanx for your effort on reading shapefiles into Flash. Im trying to work out a way to simplify shapes. Found some stuff:
Gregor Aisch &gt;&gt; http://vis4.net/blog/en/posts/simplification-of-country-outlines
and
MapShaper &gt;&gt; http://mapshaper.org/

I get a bitt lost when I try to combine your code with Gregor&#039;s code. Do you have any experience simplifying shapes?

Hope to hear from you. Thanx.</description>
		<content:encoded><![CDATA[<p>Hi Andy,</p>
<p>Thanx for your effort on reading shapefiles into Flash. Im trying to work out a way to simplify shapes. Found some stuff:<br />
Gregor Aisch &gt;&gt; <a href="http://vis4.net/blog/en/posts/simplification-of-country-outlines" rel="nofollow">http://vis4.net/blog/en/posts/simplification-of-country-outlines</a><br />
and<br />
MapShaper &gt;&gt; <a href="http://mapshaper.org/" rel="nofollow">http://mapshaper.org/</a></p>
<p>I get a bitt lost when I try to combine your code with Gregor&#8217;s code. Do you have any experience simplifying shapes?</p>
<p>Hope to hear from you. Thanx.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-106784</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Wed, 23 Feb 2011 17:22:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-106784</guid>
		<description>Andy, I sent an e-mail to your gmail account, with what I have done to date, as well as a couple of questions. Is that the best way to contact you?</description>
		<content:encoded><![CDATA[<p>Andy, I sent an e-mail to your gmail account, with what I have done to date, as well as a couple of questions. Is that the best way to contact you?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Woodruff</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-105715</link>
		<dc:creator>Andy Woodruff</dc:creator>
		<pubDate>Mon, 14 Feb 2011 04:27:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-105715</guid>
		<description>Ack. Paul, I&#039;m sorry I never replied to your comments. These code posts have kind of sunk to the bottom of the pile lately. Glad to hear you got some things working, anyway.

I do have at my disposal a lot of code for working with shapefiles and attributes, with interactivity and all, but I&#039;m not entirely at liberty to disseminate it as it&#039;s part of work done for clients and so forth. It&#039;s also so wrapped up in a complicated system that it&#039;s no simple matter to release useful bits of code. But hopefully things will evolve to a point where it&#039;s possible to post some classes that can easily be used outside of my company&#039;s particular projects.</description>
		<content:encoded><![CDATA[<p>Ack. Paul, I&#8217;m sorry I never replied to your comments. These code posts have kind of sunk to the bottom of the pile lately. Glad to hear you got some things working, anyway.</p>
<p>I do have at my disposal a lot of code for working with shapefiles and attributes, with interactivity and all, but I&#8217;m not entirely at liberty to disseminate it as it&#8217;s part of work done for clients and so forth. It&#8217;s also so wrapped up in a complicated system that it&#8217;s no simple matter to release useful bits of code. But hopefully things will evolve to a point where it&#8217;s possible to post some classes that can easily be used outside of my company&#8217;s particular projects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-99739</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Mon, 24 Jan 2011 06:40:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-99739</guid>
		<description>Well, I probably didn&#039;t do it the most efficient, but, I have the interactivity I wanted. I created a method that loops through each of the &quot;features&quot; for a particular &quot;attribute&quot; and adds mouse over, mouse out and click events. When the attribute changes I remove all of those eventlisteners and add a new set.

I also changed the way the map draws to add a parent and glow filter for each feature, so that I can control the border, when changing the color.</description>
		<content:encoded><![CDATA[<p>Well, I probably didn&#8217;t do it the most efficient, but, I have the interactivity I wanted. I created a method that loops through each of the &#8220;features&#8221; for a particular &#8220;attribute&#8221; and adds mouse over, mouse out and click events. When the attribute changes I remove all of those eventlisteners and add a new set.</p>
<p>I also changed the way the map draws to add a parent and glow filter for each feature, so that I can control the border, when changing the color.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-99665</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Mon, 24 Jan 2011 02:23:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-99665</guid>
		<description>I&#039;ve gotten to the point Omar got to, and could use some help.

I would like the ability to tell when I&#039;ve either rolled over or clicked on a region of the map. 

It would be nice if I could define an attribute of a feature that was returned on either event. Basically I would tell it to return State_name, and when I clicked on an area it might return &quot;Iowa.&quot;

I will continue playing. I have a component that I can send the name of the shape &amp; dbf file, and it creates a canvas with the map sized on it. I also implemented a generic colorchanger for a given feature, and a method that will return all of the features for a given attribute.

Interactivity is my next goal.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve gotten to the point Omar got to, and could use some help.</p>
<p>I would like the ability to tell when I&#8217;ve either rolled over or clicked on a region of the map. </p>
<p>It would be nice if I could define an attribute of a feature that was returned on either event. Basically I would tell it to return State_name, and when I clicked on an area it might return &#8220;Iowa.&#8221;</p>
<p>I will continue playing. I have a component that I can send the name of the shape &amp; dbf file, and it creates a canvas with the map sized on it. I also implemented a generic colorchanger for a given feature, and a method that will return all of the features for a given attribute.</p>
<p>Interactivity is my next goal.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-99658</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Mon, 24 Jan 2011 01:43:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-99658</guid>
		<description>I guess I wasn&#039;t that lazy, I have a working component. Would you,like what I came up with?</description>
		<content:encoded><![CDATA[<p>I guess I wasn&#8217;t that lazy, I have a working component. Would you,like what I came up with?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-99570</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Sun, 23 Jan 2011 19:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-99570</guid>
		<description>I am trying to convert your ShapefileExample into a component that I can use to display maps and then extend it.

Being lazy, I thought I’d ask to see if you have already done this?</description>
		<content:encoded><![CDATA[<p>I am trying to convert your ShapefileExample into a component that I can use to display maps and then extend it.</p>
<p>Being lazy, I thought I’d ask to see if you have already done this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Omar</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-56624</link>
		<dc:creator>Omar</dc:creator>
		<pubDate>Sat, 28 Aug 2010 01:07:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-56624</guid>
		<description>Thank you Andy. You saved me some hassle.

Is there a way to add a roll over event listener to each state?

When I do click it works fine by state, but roll over includes the entire map.

Works
map.addEventListener(MouseEvent.CLICK, clickedMe);

Doesn&#039;t work
map.addEventListener(MouseEvent.ROLL_OVER, rOver);

And access each one&#039;s properties in a loop. Is this through map (ShpMap class) or f (ShpFeature class)?</description>
		<content:encoded><![CDATA[<p>Thank you Andy. You saved me some hassle.</p>
<p>Is there a way to add a roll over event listener to each state?</p>
<p>When I do click it works fine by state, but roll over includes the entire map.</p>
<p>Works<br />
map.addEventListener(MouseEvent.CLICK, clickedMe);</p>
<p>Doesn&#8217;t work<br />
map.addEventListener(MouseEvent.ROLL_OVER, rOver);</p>
<p>And access each one&#8217;s properties in a loop. Is this through map (ShpMap class) or f (ShpFeature class)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy Woodruff</title>
		<link>http://andywoodruff.com/blog/simple-shapefile-drawing-in-actionscript-3/comment-page-1/#comment-48188</link>
		<dc:creator>Andy Woodruff</dc:creator>
		<pubDate>Wed, 21 Jul 2010 14:29:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.cartogrammar.com/blog/?p=235#comment-48188</guid>
		<description>Rasmikant, if your shapefile doesn&#039;t draw, it may be because of the projection. When the coordinates are in meters, Flash sometimes doesn&#039;t handle the large numbers well. In ShpFeature.as, look for the line:

&lt;code&gt;protected var scaleFactor : Number = 500;&lt;/code&gt;

Instead of 500 try something much lower, perhaps simply 1. That has usually been the solution for me. Otherwise I&#039;m not certain what the problem might be.</description>
		<content:encoded><![CDATA[<p>Rasmikant, if your shapefile doesn&#8217;t draw, it may be because of the projection. When the coordinates are in meters, Flash sometimes doesn&#8217;t handle the large numbers well. In ShpFeature.as, look for the line:</p>
<p><code>protected var scaleFactor : Number = 500;</code></p>
<p>Instead of 500 try something much lower, perhaps simply 1. That has usually been the solution for me. Otherwise I&#8217;m not certain what the problem might be.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

