<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - flash - 9.0 - ActionScriptLangRefV3 - statements.html</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-25T10:24:45</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#84274" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#83217" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#82487" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#81814" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#84274">
		<title>flash/9.0/ActionScriptLangRefV3/statements.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#84274</link>
		<description>The switch statement should have an example of using multiple cases for the same logical functionality. Other languages implement this differently, and an example clarifying is useful.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;var switchExpression:int = 3;&lt;br /&gt;        &lt;br /&gt;switch (switchExpression) {&lt;br /&gt;    case 0:&lt;br /&gt;        trace(0);&lt;br /&gt;        break;&lt;br /&gt;    case 1:&lt;br /&gt;        trace(1);&lt;br /&gt;        break;&lt;br /&gt;    case 2:&lt;br /&gt;    case 4:&lt;br /&gt;        trace(&quot;2 or 4&quot;);&lt;br /&gt;        break;&lt;br /&gt;    default:&lt;br /&gt;        trace(&quot;Not 0, 1, 2 or 4&quot;);&lt;br /&gt;}</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-05-23T10:13:49</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#83217">
		<title>flash/9.0/ActionScriptLangRefV3/statements.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#83217</link>
		<description>I have found that the &quot;with&quot; statement doesn't seem to work on custom properties.&lt;br /&gt;&lt;br /&gt;For example, this code excerpt doesn't work:&lt;br /&gt;lights = new Array();&lt;br /&gt;for (i = 0; i &lt; numLights; i++) {&lt;br /&gt;    var thisLight:Light = new Light();&lt;br /&gt;    with (thisLight) {&lt;br /&gt;        lightColors.gotoAndStop(i + 1); // show proper frame&lt;br /&gt;        x = i * 75 + 100;&lt;br /&gt;        y = 175;&lt;br /&gt;        lightNum = i;&lt;br /&gt;       addEventListener(MouseEvent.CLICK, clickLight);&lt;br /&gt;       buttonMode = true;&lt;br /&gt;    }&lt;br /&gt;    lights.push(thisLight); // add to array of lights&lt;br /&gt;    addChild(thisLight); // add to screen&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;If I modify it to:&lt;br /&gt;lights = new Array();&lt;br /&gt;for (i = 0; i &lt; numLights; i++) {&lt;br /&gt;    var thisLight:Light = new Light();&lt;br /&gt;    with (thisLight) {&lt;br /&gt;        lightColors.gotoAndStop(i + 1); // show proper frame&lt;br /&gt;        x = i * 75 + 100;&lt;br /&gt;        y = 175;&lt;br /&gt;       addEventListener(MouseEvent.CLICK, clickLight);&lt;br /&gt;       buttonMode = true;&lt;br /&gt;    }&lt;br /&gt;    thisLight.lightNum = i;&lt;br /&gt;    lights.push(thisLight); // add to array of lights&lt;br /&gt;    addChild(thisLight); // add to screen&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;it works...&lt;br /&gt;&lt;br /&gt;In other words, putting the line&lt;br /&gt;trace(thisLight.lightNum);&lt;br /&gt;inside the first loop gives me a series of &quot;undefined&quot;, but within the second loop, I see the 0-4 results.</description>
		<dc:creator>Loveanie</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-04-20T18:45:22</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#82487">
		<title>flash/9.0/ActionScriptLangRefV3/statements.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#82487</link>
		<description>Perhaps a bit nitpicky but the example given is clearly an AS2 example that has not been updated for AS3.  While any of the identifiers used are valid, they do not reflect inherent properties of the MovieClip class as it seems is intended.</description>
		<dc:creator>bomby</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-03-31T07:45:11</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#81814">
		<title>flash/9.0/ActionScriptLangRefV3/statements.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/statements.html#81814</link>
		<description>[import directive]:&lt;br /&gt;Wrong: &quot;The import directive applies only to the current script (frame or &lt;br /&gt;object) in which it's called.&quot;  And the rest of the explanation.  As this &lt;br /&gt;describes behavior in ActionScript 2.0&lt;br /&gt;&lt;br /&gt;Correct: &quot;The import directive applies to the whole timeline in which it's &lt;br /&gt;called.&quot;</description>
		<dc:creator>Fumio Nonaka</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-03-12T02:13:40</dc:date>
	</item>
	</rdf:RDF>

