<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: Changing the position of a Flash object with external data.</title>
	<link>http://ask.metafilter.com/34040/Changing-the-position-of-a-Flash-object-with-external-data/</link>
	<description>Comments on Ask MetaFilter post Changing the position of a Flash object with external data.</description>
	<pubDate>Thu, 09 Mar 2006 10:23:51 -0800</pubDate>
	<lastBuildDate>Thu, 09 Mar 2006 10:23:51 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: Changing the position of a Flash object with external data.</title>
		<link>http://ask.metafilter.com/34040/Changing-the-position-of-a-Flash-object-with-external-data</link>	
		<description>How can I change the position of an object in a Flash file with data from an external (XML) file? &lt;br /&gt;&lt;br /&gt; I need to change the position of an object in my Flash movie based on changes in external data. I have an XML file with the data, and I know how to get the XML into Flash. How do I tell Flash to change the object&apos;s position?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2006:site.34040</guid>
		<pubDate>Thu, 09 Mar 2006 10:18:00 -0800</pubDate>
		<dc:creator>kirkaracha</dc:creator>
		
			<category>flash</category>
		
			<category>actionscript</category>
		
			<category>xml</category>
		
	</item> <item>
		<title>By: kaseijin</title>
		<link>http://ask.metafilter.com/34040/Changing-the-position-of-a-Flash-object-with-external-data#530736</link>	
		<description>What sort of data is it?  Are you trying to pass variables into Flash that will determing X/Y coords?&lt;br&gt;
&lt;br&gt;
I can probably help (professional Flasher), but I need more details...</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.34040-530736</guid>
		<pubDate>Thu, 09 Mar 2006 10:23:51 -0800</pubDate>
		<dc:creator>kaseijin</dc:creator>
	</item><item>
		<title>By: DragonBoy</title>
		<link>http://ask.metafilter.com/34040/Changing-the-position-of-a-Flash-object-with-external-data#530750</link>	
		<description>Say your XML node for the object is this:&lt;br&gt;
&amp;lt;cities&amp;gt;&lt;br&gt;
&amp;lt;city x=&quot;33&quot; y=&quot;320&quot; name=&quot;New York&quot; clip=&quot;nyc_mc&quot; /&amp;gt;&lt;br&gt;
&amp;lt;city x=&quot;98&quot; y=&quot;71&quot; name=&quot;San Francisco&quot; clip=&quot;sf_mc&quot; /&amp;gt;&lt;br&gt;
&amp;lt;city x=&quot;420&quot; y=&quot;64&quot; name=&quot;Dallas&quot; clip=&quot;dal_mc&quot; /&amp;gt;&lt;br&gt;
&amp;lt;/cities&amp;gt;&lt;br&gt;
&lt;br&gt;
Once you&apos;ve loaded the XML into flash and you&apos;ve parsed it you&apos;ll need something like this to move the movieClips you want to where you want:&lt;br&gt;
&lt;br&gt;
// parsing the above XML down to all the city nodes&lt;br&gt;
// being called cityNode in actionscript 1.0&lt;br&gt;
// (for compatibility&apos;s sake) inside a for loop:&lt;br&gt;
for (i = 0; i &lt; citynodes; i ++) {br&gt;
  var obj_mc = eval(cityNode[i].attributes.clip);&lt;br&gt;
  obj_mc._x = cityNode[i].attributes.x;&lt;br&gt;
  obj_mc._y = cityNode[i].attributes.y;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
Hope that helps.&lt;/&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.34040-530750</guid>
		<pubDate>Thu, 09 Mar 2006 10:35:10 -0800</pubDate>
		<dc:creator>DragonBoy</dc:creator>
	</item><item>
		<title>By: DragonBoy</title>
		<link>http://ask.metafilter.com/34040/Changing-the-position-of-a-Flash-object-with-external-data#530752</link>	
		<description>Woops, that&apos;s supposed to read:&lt;br&gt;
&lt;br&gt;
for (i = 0; i &amp;lt; citynodes.length; i ++) {&lt;br&gt;
var obj_mc = eval(cityNode[i].attributes.clip);&lt;br&gt;
obj_mc._x = cityNode[i].attributes.x;&lt;br&gt;
obj_mc._y = cityNode[i].attributes.y;&lt;br&gt;
}</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.34040-530752</guid>
		<pubDate>Thu, 09 Mar 2006 10:36:11 -0800</pubDate>
		<dc:creator>DragonBoy</dc:creator>
	</item><item>
		<title>By: kirkaracha</title>
		<link>http://ask.metafilter.com/34040/Changing-the-position-of-a-Flash-object-with-external-data#530978</link>	
		<description>Thanks!</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.34040-530978</guid>
		<pubDate>Thu, 09 Mar 2006 13:50:21 -0800</pubDate>
		<dc:creator>kirkaracha</dc:creator>
	</item><item>
		<title>By: kookywon</title>
		<link>http://ask.metafilter.com/34040/Changing-the-position-of-a-Flash-object-with-external-data#531092</link>	
		<description>I don&apos;t know if flash is a requirement, but I&apos;ve seen people do similar stuff with XML and &lt;a href=&quot;http://en.wikipedia.org/wiki/Scalable_Vector_Graphics&quot;&gt;Scalable Vector Graphics&lt;/a&gt;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.34040-531092</guid>
		<pubDate>Thu, 09 Mar 2006 15:00:38 -0800</pubDate>
		<dc:creator>kookywon</dc:creator>
	</item>
	</channel>
</rss>
