<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Flash Actionscript string[] array</title>
	<atom:link href="http://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/feed/" rel="self" type="application/rss+xml" />
	<link>http://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/</link>
	<description>Why didn't I think of that</description>
	<lastBuildDate>Wed, 21 Oct 2009 06:03:51 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: theolagendijk</title>
		<link>http://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-5750</link>
		<dc:creator>theolagendijk</dc:creator>
		<pubDate>Thu, 06 Sep 2007 15:01:10 +0000</pubDate>
		<guid isPermaLink="false">https://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-5750</guid>
		<description>I don&#039;t see anything &lt;i&gt;wrong&lt;/i&gt; with this code that would prevent the if statements from being evaluated. Are you sure that the strings &lt;i&gt;arreglo3&lt;/i&gt;, &lt;i&gt;arreglo4&lt;/i&gt; and &lt;i&gt;arreglo5&lt;/i&gt; contain the right data? 

Try adding this statement right after you initialized the strings &lt;i&gt;arreglo3&lt;/i&gt;, &lt;i&gt;arreglo4&lt;/i&gt; and &lt;i&gt;arreglo5&lt;/i&gt;;

&lt;b&gt;trace(&quot;arreglo3: &quot;+arreglo3+&quot; arreglo4: &quot;+arreglo4+&quot; arreglo5: &quot;+arreglo5);&lt;/b&gt;

Does this statement print out what you expected it to print out?</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see anything <i>wrong</i> with this code that would prevent the if statements from being evaluated. Are you sure that the strings <i>arreglo3</i>, <i>arreglo4</i> and <i>arreglo5</i> contain the right data? </p>
<p>Try adding this statement right after you initialized the strings <i>arreglo3</i>, <i>arreglo4</i> and <i>arreglo5</i>;</p>
<p><b>trace(&#8220;arreglo3: &#8220;+arreglo3+&#8221; arreglo4: &#8220;+arreglo4+&#8221; arreglo5: &#8220;+arreglo5);</b></p>
<p>Does this statement print out what you expected it to print out?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: alejandro</title>
		<link>http://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-5748</link>
		<dc:creator>alejandro</dc:creator>
		<pubDate>Thu, 06 Sep 2007 14:39:14 +0000</pubDate>
		<guid isPermaLink="false">https://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-5748</guid>
		<description>hei,,  i dont know if you have the time to answer me this questions,  but i&#039;m a little bit deseperated....

i have this script:


var arreglo3:String =_root.btn3admintitle;

var arreglo4:String =_root.btn4minsidetitle;

var arreglo5:String =_root.btn5systemtitle;


if(arreglo3 == &quot;falso&quot;){
	_root.btn3.titu.text = arreglo3;
}
	else{
	_root.mainMenu.peliMovie.attachMovie(&quot;btn3admin&quot;, &quot;btn3adminvideo&quot;, this.getNextHighestDepth(), {_x:5, _y:18});
}



if(arreglo4 == &quot;falso&quot;){
	this.btn4.titu.text = arreglo4;
}
	else{
	this.mainMenu.peliMovie.attachMovie(&quot;btn4minside&quot;, &quot;btn4minsidevideo&quot;, this.getNextHighestDepth(), {_x:5, _y:54});
}


if(arreglo5 == &quot;falso&quot;){
	this.btn5.titu.text = arreglo5;
}
	else{
	this.mainMenu.peliMovie.attachMovie(&quot;btn5system&quot;, &quot;btn5systemvideo&quot;, this.getNextHighestDepth(), {_x:5, _y:92});
}



what i want to do is to evaluate several times different variables, wheter if they are = to &quot;falso&quot; or to ather string, 

The problem is that when the script runs it only read the last script...  the last &quot;if&quot;...  how can i make it to read all the 3 &quot;if&#039;s&quot;...??  or more?....

thanks

alejandro</description>
		<content:encoded><![CDATA[<p>hei,,  i dont know if you have the time to answer me this questions,  but i&#8217;m a little bit deseperated&#8230;.</p>
<p>i have this script:</p>
<p>var arreglo3:String =_root.btn3admintitle;</p>
<p>var arreglo4:String =_root.btn4minsidetitle;</p>
<p>var arreglo5:String =_root.btn5systemtitle;</p>
<p>if(arreglo3 == &#8220;falso&#8221;){<br />
	_root.btn3.titu.text = arreglo3;<br />
}<br />
	else{<br />
	_root.mainMenu.peliMovie.attachMovie(&#8220;btn3admin&#8221;, &#8220;btn3adminvideo&#8221;, this.getNextHighestDepth(), {_x:5, _y:18});<br />
}</p>
<p>if(arreglo4 == &#8220;falso&#8221;){<br />
	this.btn4.titu.text = arreglo4;<br />
}<br />
	else{<br />
	this.mainMenu.peliMovie.attachMovie(&#8220;btn4minside&#8221;, &#8220;btn4minsidevideo&#8221;, this.getNextHighestDepth(), {_x:5, _y:54});<br />
}</p>
<p>if(arreglo5 == &#8220;falso&#8221;){<br />
	this.btn5.titu.text = arreglo5;<br />
}<br />
	else{<br />
	this.mainMenu.peliMovie.attachMovie(&#8220;btn5system&#8221;, &#8220;btn5systemvideo&#8221;, this.getNextHighestDepth(), {_x:5, _y:92});<br />
}</p>
<p>what i want to do is to evaluate several times different variables, wheter if they are = to &#8220;falso&#8221; or to ather string, </p>
<p>The problem is that when the script runs it only read the last script&#8230;  the last &#8220;if&#8221;&#8230;  how can i make it to read all the 3 &#8220;if&#8217;s&#8221;&#8230;??  or more?&#8230;.</p>
<p>thanks</p>
<p>alejandro</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Terrence</title>
		<link>http://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-1358</link>
		<dc:creator>Terrence</dc:creator>
		<pubDate>Wed, 24 Jan 2007 16:03:08 +0000</pubDate>
		<guid isPermaLink="false">https://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-1358</guid>
		<description>I have a project that requires an 8x8 dot matrix array and I will have up to 20 or so of these. do you have some insight you could share on how to set up a structure that I can take binary data that would come from a lookup table like a case/switch to make up the on and off&#039;s for the dots and with the push of a button shift in new data one column at a time? So what I have is an 8x8_0_mc prefix in each new _mc there will be instances of a dot I could controlled what color I wont the dot physically by adding frames or control each new instances by tint. ? if you could help or lead me in the right direction I would appreciate it 

-Terrence</description>
		<content:encoded><![CDATA[<p>I have a project that requires an 8&#215;8 dot matrix array and I will have up to 20 or so of these. do you have some insight you could share on how to set up a structure that I can take binary data that would come from a lookup table like a case/switch to make up the on and off&#8217;s for the dots and with the push of a button shift in new data one column at a time? So what I have is an 8&#215;8_0_mc prefix in each new _mc there will be instances of a dot I could controlled what color I wont the dot physically by adding frames or control each new instances by tint. ? if you could help or lead me in the right direction I would appreciate it </p>
<p>-Terrence</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carolyn</title>
		<link>http://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-90</link>
		<dc:creator>carolyn</dc:creator>
		<pubDate>Fri, 15 Sep 2006 22:22:25 +0000</pubDate>
		<guid isPermaLink="false">https://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-90</guid>
		<description>yeah.

when it&#039;s been vital to ensure the type consistency of an array, i&#039;ve just kept some quick little functions around to test each element to see if it matches the intended type and return a log of any that are an incorrect type... but that gets to be more of a pain if your array is full of objects with multiple kinds of data in each one. arg.</description>
		<content:encoded><![CDATA[<p>yeah.</p>
<p>when it&#8217;s been vital to ensure the type consistency of an array, i&#8217;ve just kept some quick little functions around to test each element to see if it matches the intended type and return a log of any that are an incorrect type&#8230; but that gets to be more of a pain if your array is full of objects with multiple kinds of data in each one. arg.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: theolagendijk</title>
		<link>http://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-86</link>
		<dc:creator>theolagendijk</dc:creator>
		<pubDate>Fri, 15 Sep 2006 18:55:37 +0000</pubDate>
		<guid isPermaLink="false">https://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-86</guid>
		<description>Hi carolyn, 

I think that&#039;s a valid conclusion. Well at least for ActionScript up to version 2, I don&#039;t know how things are arranged in ActionScript 3. Before ActionScript 2 it was even possible to switch the data type of a variable at runtime like this:
&lt;i&gt;var alpha = 521;
alpha = &quot;Bloomfield Rocks!&quot;;&lt;/i&gt;
It&#039;s called weak data typing, you don&#039;t explicitly state data types and they are dynamicly changed by the operations you perform on them. 
For example:
&lt;i&gt;var alpha = 2;
alpha += &quot; be or not 2 be&quot;;&lt;/i&gt;
Assigning 2 to alpha makes it a Number. The String concatenation operator &#039;+=&#039; transforms alpha into a String.
As of ActionScript 2 this is no longer possible. Variables are now strong typed, in the sense that they keep the data type with which they where initialized. But explicitly stating the type is not obligatory.
I try to give my code as much type information as possible because I&#039;ve heard that this increases the performance of the compiled code, but I never found a way to specify the &lt;i&gt;type&lt;/i&gt; of Array content. 
I do know how to specify types of variables in variable declarations with the &#039;:&#039; operator .
For example:
&lt;i&gt;var s:String = &quot;Hi&quot;;&lt;/i&gt;
And in function declarations.
&lt;i&gt;function myFunction(param1:Number, param2:Object):String
{
 return &quot;result = &quot;+(param1+param2.num);
}&lt;/i&gt;
Where parameters 1 and 2 (param1 and param2) have a explicit type and the function as a whole has a return type.
Besides making your code faster, it makes your code more readible and makes the compiler able to detect errorenous type usage. (For example trying to add a String return type from a function to a number.)

I wish I knew how to explicitly state the type content of an Array. For now I state it in my code comments. Please let me know when you found a solution. But I think it doesn&#039;t exists. One strong indication of this is the fact that it&#039;s possible to store different types in the same array. This code, I just tried, compiles without errors!
&lt;i&gt;
var i:Number = 9;
var o:Object = new Object();
var s:String = &quot;Hello World!&quot;;

var arr:Array = new Array(i,o,s);
&lt;/i&gt;</description>
		<content:encoded><![CDATA[<p>Hi carolyn, </p>
<p>I think that&#8217;s a valid conclusion. Well at least for ActionScript up to version 2, I don&#8217;t know how things are arranged in ActionScript 3. Before ActionScript 2 it was even possible to switch the data type of a variable at runtime like this:<br />
<i>var alpha = 521;<br />
alpha = &#8220;Bloomfield Rocks!&#8221;;</i><br />
It&#8217;s called weak data typing, you don&#8217;t explicitly state data types and they are dynamicly changed by the operations you perform on them.<br />
For example:<br />
<i>var alpha = 2;<br />
alpha += &#8221; be or not 2 be&#8221;;</i><br />
Assigning 2 to alpha makes it a Number. The String concatenation operator &#8216;+=&#8217; transforms alpha into a String.<br />
As of ActionScript 2 this is no longer possible. Variables are now strong typed, in the sense that they keep the data type with which they where initialized. But explicitly stating the type is not obligatory.<br />
I try to give my code as much type information as possible because I&#8217;ve heard that this increases the performance of the compiled code, but I never found a way to specify the <i>type</i> of Array content.<br />
I do know how to specify types of variables in variable declarations with the &#8216;:&#8217; operator .<br />
For example:<br />
<i>var s:String = &#8220;Hi&#8221;;</i><br />
And in function declarations.<br />
<i>function myFunction(param1:Number, param2:Object):String<br />
{<br />
 return &#8220;result = &#8220;+(param1+param2.num);<br />
}</i><br />
Where parameters 1 and 2 (param1 and param2) have a explicit type and the function as a whole has a return type.<br />
Besides making your code faster, it makes your code more readible and makes the compiler able to detect errorenous type usage. (For example trying to add a String return type from a function to a number.)</p>
<p>I wish I knew how to explicitly state the type content of an Array. For now I state it in my code comments. Please let me know when you found a solution. But I think it doesn&#8217;t exists. One strong indication of this is the fact that it&#8217;s possible to store different types in the same array. This code, I just tried, compiles without errors!<br />
<i><br />
var i:Number = 9;<br />
var o:Object = new Object();<br />
var s:String = &#8220;Hello World!&#8221;;</p>
<p>var arr:Array = new Array(i,o,s);<br />
</i></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: carolyn</title>
		<link>http://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-83</link>
		<dc:creator>carolyn</dc:creator>
		<pubDate>Fri, 15 Sep 2006 16:14:31 +0000</pubDate>
		<guid isPermaLink="false">https://theolagendijk.wordpress.com/2006/08/22/flash-actionscript-string-array/#comment-83</guid>
		<description>okay, so as far as i can tell, there is no conceivable way to specify a class (or even a primitive data type) for the elements in an array.

um... wtf?

please tell me i&#039;m just missing something.</description>
		<content:encoded><![CDATA[<p>okay, so as far as i can tell, there is no conceivable way to specify a class (or even a primitive data type) for the elements in an array.</p>
<p>um&#8230; wtf?</p>
<p>please tell me i&#8217;m just missing something.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
