<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>nichmekof.com &#187; Tips &amp; Tricks</title>
	<atom:link href="http://blog.nichmekof.com/category/tips-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nichmekof.com</link>
	<description>Learnings of a flash developer</description>
	<lastBuildDate>Wed, 26 May 2010 03:21:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Instance names and code hinting &#8211; Tips &amp; Tricks</title>
		<link>http://blog.nichmekof.com/2009/03/instance-names-and-code-hinting-tips-tricks/</link>
		<comments>http://blog.nichmekof.com/2009/03/instance-names-and-code-hinting-tips-tricks/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 07:59:22 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[code hinting]]></category>
		<category><![CDATA[instance names]]></category>

		<guid isPermaLink="false">http://blog.nichmekof.com/?p=103</guid>
		<description><![CDATA[When coding in actionscript sometimes it can be a pain that you don't get code hinting with objects that are on stage. A good way of overcoming this is to change the instance names of your objects (Movie Clips, Buttons, etc.) to have an underscore "_" then the abbreviated name of that object at the [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-108" style="float:left;margin-right:10px;" title="code_hinting" src="http://blog.nichmekof.com/wp-content/uploads/2009/02/code_hinting.jpg" alt="code_hinting" width="382" height="190" />When coding in actionscript sometimes it can be a pain that you don't get code hinting with objects that are on stage. A good way of overcoming this is to change the instance names of your objects (Movie Clips, Buttons, etc.) to have an underscore <strong>"_"</strong> then the abbreviated name of that object at the end of the name.</p>
<p>For example, you may have a movie clip on stage called <strong>myMovieClip</strong>. Change the instance name to have an <strong>_mc</strong> at the end (<strong>myMovieClip_mc</strong>), and now in your actions panel type <strong>myMovieClip_mc</strong> and press period. You will now see all the code hinting for a movie clip popup (see image). This can save a whole heap of time when coding.</p>
<p>Here is a list of the different shortcuts that you can use to bring up the code hinting. Some of these are for AS2 but the rest will work with AS3.</p>
<table border="0" cellspacing="0" cellpadding="0">
<thead>
<tr>
<th width="128" valign="top">Object type</th>
<th width="116" valign="top">Variable suffix</th>
</tr>
</thead>
<tbody>
<tr>
<td valign="top">Array</td>
<td valign="top">_array</td>
</tr>
<tr>
<td valign="top">Button</td>
<td valign="top">_btn</td>
</tr>
<tr>
<td valign="top">Camera</td>
<td valign="top">_cam</td>
</tr>
<tr>
<td valign="top">Color</td>
<td valign="top">_color</td>
</tr>
<tr>
<td valign="top">ContextMenu</td>
<td valign="top">_cm</td>
</tr>
<tr>
<td valign="top">ContextMenuItem</td>
<td valign="top">_cmi</td>
</tr>
<tr>
<td valign="top">Date</td>
<td valign="top">_date</td>
</tr>
<tr>
<td valign="top">Error</td>
<td valign="top">_err</td>
</tr>
<tr>
<td valign="top">LoadVars</td>
<td valign="top">_lv</td>
</tr>
<tr>
<td valign="top">LocalConnection</td>
<td valign="top">_lc</td>
</tr>
<tr>
<td valign="top">Microphone</td>
<td valign="top">_mic</td>
</tr>
<tr>
<td valign="top">MovieClip</td>
<td valign="top">_mc</td>
</tr>
<tr>
<td valign="top">MovieClipLoader</td>
<td valign="top">_mcl</td>
</tr>
<tr>
<td valign="top">PrintJob</td>
<td valign="top">_pj</td>
</tr>
<tr>
<td valign="top">NetConnection</td>
<td valign="top">_nc</td>
</tr>
<tr>
<td valign="top">NetStream</td>
<td valign="top">_ns</td>
</tr>
<tr>
<td valign="top">SharedObject</td>
<td valign="top">_so</td>
</tr>
<tr>
<td valign="top">Sound</td>
<td valign="top">_sound</td>
</tr>
<tr>
<td valign="top">String</td>
<td valign="top">_str</td>
</tr>
<tr>
<td valign="top">TextField</td>
<td valign="top">_txt</td>
</tr>
<tr>
<td valign="top">TextFormat</td>
<td valign="top">_fmt</td>
</tr>
<tr>
<td valign="top">Video</td>
<td valign="top">_video</td>
</tr>
<tr>
<td valign="top">XML</td>
<td valign="top">_xml</td>
</tr>
<tr>
<td valign="top">XMLNode</td>
<td valign="top">_xmlnode</td>
</tr>
<tr>
<td valign="top">XMLSocket</td>
<td valign="top">_xmlsocket</td>
</tr>
</tbody>
</table>
<p>I find that using this technique saves me a whole heap of time when programming.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nichmekof.com/2009/03/instance-names-and-code-hinting-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make a button from a MovieClip &#8211; Tips &amp; Tricks</title>
		<link>http://blog.nichmekof.com/2009/02/make-a-button-from-a-movieclip-tips-tricks/</link>
		<comments>http://blog.nichmekof.com/2009/02/make-a-button-from-a-movieclip-tips-tricks/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 10:00:59 +0000</pubDate>
		<dc:creator>Ed</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://blog.nichmekof.com/?p=95</guid>
		<description><![CDATA[In the first meeting of A-SFUG I showed a tip about creating the up, over and down states of a button using a movie clip. I thought that I should put it up here as a reference.
An easy way of creating a button from a movie clip is to give the names of the frames [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-101" style="margin-right:10px; float:left;" title="movieclipbtn" src="http://blog.nichmekof.com/wp-content/uploads/2009/02/movieclipbtn.png" alt="movieclipbtn" width="350" height="279" />In the first meeting of <a title="A-SFUG" href="http://www.a-sfug.com" target="_blank">A-SFUG</a> I showed a tip about creating the up, over and down states of a button using a movie clip. I thought that I should put it up here as a reference.</p>
<p>An easy way of creating a button from a movie clip is to give the names of the frames with the different states of the button "<strong>_up</strong>", "<strong>_over</strong>" and "<strong>_down</strong>".</p>
<p>Add a stop(); frame  on frame 1 of the movie clip. Then out on the main timeline, open the actions panel and write:</p>
<pre>myButton_btn.buttonMode = true;</pre>
<p>Just change <strong>myButton_btn</strong> to the instance name of your movieclip.</p>
<p>Now test the movie and roll over the button and It will now go to the over state. Press down on it and it will go to the down state.</p>
<p>So you do not need to write the code for on roll over, on mouse down and on roll out. Flash will automatically detect what you are wanting to do and do it for you.</p>
<p>Now you may be asking "Why should I do it this way? Why can't I just make it as a regular button?" Well you can still do it that way if you like, however the benefit of doing it this way is that a movie clip is more light weight then a button. This means that flash can run a bit faster.</p>
<p>Cheers,<br />
Ed</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.nichmekof.com/2009/02/make-a-button-from-a-movieclip-tips-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
