<?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>Helmut Granda &#187; Tutorials</title>
	<atom:link href="http://www.helmutgranda.com/category/tutorials/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.helmutgranda.com</link>
	<description>learning through interaction</description>
	<lastBuildDate>Mon, 19 Jul 2010 15:01:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Dynamic sliders numero 2</title>
		<link>http://www.helmutgranda.com/2007/03/29/dynamic-sliders-numero-2/</link>
		<comments>http://www.helmutgranda.com/2007/03/29/dynamic-sliders-numero-2/#comments</comments>
		<pubDate>Thu, 29 Mar 2007 22:10:44 +0000</pubDate>
		<dc:creator>Helmut Granda</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.helmutgranda.com/2007/03/29/dynamic-sliders-numero-2/</guid>
		<description><![CDATA[Title: Dynamic Sliders Numero 2 After working with the previous version of the sliders -se previous post-. I had the opportunity to "upgrade" the sliders since there was a slight chance that the sliders had to react to only one button rather than two as originally planned. Needless to say it wasn't required to apply [...]]]></description>
			<content:encoded><![CDATA[<p>Title: Dynamic Sliders Numero 2</p>
<p>After working with the previous version of the sliders -se previous post-. I had the opportunity to "upgrade" the sliders since there was a slight chance that the sliders had to react to only one button rather than two as originally planned. Needless to say it wasn't required to apply this update but it came out nice. Once again there was no need to update anything in the class but just 2 extra lines of code.</p>

<object	type="application/x-shockwave-flash"
			data="/labs/swf/slider2.swf"
			width="300"
			height="250">
	<param name="movie" value="/labs/swf/slider2.swf" />
</object>
]]></content:encoded>
			<wfw:commentRss>http://www.helmutgranda.com/2007/03/29/dynamic-sliders-numero-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dynamic Sliders</title>
		<link>http://www.helmutgranda.com/2007/03/27/dynamic-sliders/</link>
		<comments>http://www.helmutgranda.com/2007/03/27/dynamic-sliders/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 04:32:52 +0000</pubDate>
		<dc:creator>Helmut Granda</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.helmutgranda.com/2007/03/27/dynamic-sliders/</guid>
		<description><![CDATA[So I was working on a project where we needed some sliders, it was basically the same slider but in different sizes and positions. So today I was sitting there just wondering how I could make this more dynamic, and just put a small class together and created a small sample. Updating the sliders the [...]]]></description>
			<content:encoded><![CDATA[<p>So I was working on a project where we needed some sliders, it was basically the same slider but in different sizes and positions. So today I was sitting there just wondering how I could make this more dynamic, and just put a small class together and created a small sample. Updating the sliders the way they were originally created took a long time but allowing the sliders take the parameters dynamically it took seconds to update.</p>
<p>Here is the sample and feel free to play with it <img src='http://www.helmutgranda.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

<object	type="application/x-shockwave-flash"
			data="/labs/swf/slider.swf"
			width="300"
			height="250">
	<param name="movie" value="/labs/swf/slider.swf" />
</object>
]]></content:encoded>
			<wfw:commentRss>http://www.helmutgranda.com/2007/03/27/dynamic-sliders/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Buggy Buttons converted to MovieClips in the Library</title>
		<link>http://www.helmutgranda.com/2006/11/10/buggy-buttons-converted-to-movieclips-in-the-library/</link>
		<comments>http://www.helmutgranda.com/2006/11/10/buggy-buttons-converted-to-movieclips-in-the-library/#comments</comments>
		<pubDate>Fri, 10 Nov 2006 20:40:41 +0000</pubDate>
		<dc:creator>Helmut Granda</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.helmutgranda.com/2006/11/10/buggy-buttons-converted-to-movieclips-in-the-library/</guid>
		<description><![CDATA[So I was running in to the following problem: **Warning** The linkage identifier 'RewindBtn' was already assigned to the symbol 'FLVPlayer_assets/Buttons/Rewind', and cannot be assigned to the symbol 'FLVPlayer_assets/Buttons/Rewind', since linkage identifiers must be unique. But in reallity I only had 1 button called Rewind with the Link ID of RewindBtn and nothing else. I [...]]]></description>
			<content:encoded><![CDATA[<p>So I was running in to the following problem:</p>
<p>**Warning** The linkage identifier 'RewindBtn' was already assigned to the symbol 'FLVPlayer_assets/Buttons/Rewind', and cannot be assigned to the symbol 'FLVPlayer_assets/Buttons/Rewind', since linkage identifiers must be unique.</p>
<p>But in reallity I only had 1 button called Rewind with the Link ID of RewindBtn and nothing else. I even created a blank FLA and pasted the simbol by itself in the blank FLA but I still were getting the same warning.</p>
<p>Well after doing a search online and trinkering with flash I figured out that originally I had created the Symbol as button and then transformed the Button to a MovieClip within the Library but never changed the&nbsp; Button to a MovieClip within the Properties panel in Flash. </p>
<p>Go figure! the warning has gone away.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.helmutgranda.com/2006/11/10/buggy-buttons-converted-to-movieclips-in-the-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoDaddy and MySQL access</title>
		<link>http://www.helmutgranda.com/2006/10/11/godaddy-and-mysql-access/</link>
		<comments>http://www.helmutgranda.com/2006/10/11/godaddy-and-mysql-access/#comments</comments>
		<pubDate>Wed, 11 Oct 2006 19:48:07 +0000</pubDate>
		<dc:creator>Helmut Granda</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.helmutgranda.com/2006/10/11/godaddy-and-mysql-access/</guid>
		<description><![CDATA[If you are a developer and you do some sort of backend work there is a chance one of your clients might ask you to install an application in GoDaddy servers. So if you are trying to connect to a dabase within your application what GoDaddy recommends is to use mysql.secureserver.net as your hostname. Maybe [...]]]></description>
			<content:encoded><![CDATA[<p>If you are a developer and you do some sort of backend work there is a chance one of your clients might ask you to install an application in GoDaddy servers. </p>
<p>So if you are trying to connect to a dabase within your application what GoDaddy recommends is to use mysql.secureserver.net as your hostname. Maybe this could have worked while back but <a href="http://help.godaddy.com/article.php?article_id=249&#038;topic_id=&#038;&" title="GoDaddy Help Menu" target="_blank">that information</a> is not true for all servers.</p>
<p>If you are having problems all you have to do is login to your GoDaddy control panel and look what server has GoDaddy assigned for you, at least that is how it worked out for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.helmutgranda.com/2006/10/11/godaddy-and-mysql-access/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Loading a RSS feed into Flash</title>
		<link>http://www.helmutgranda.com/2005/05/15/loading-a-rss-feed-into-flash/</link>
		<comments>http://www.helmutgranda.com/2005/05/15/loading-a-rss-feed-into-flash/#comments</comments>
		<pubDate>Sun, 15 May 2005 15:58:38 +0000</pubDate>
		<dc:creator>Helmut Granda</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.helmutgranda.com/?p=155</guid>
		<description><![CDATA[ActionScript: // create a new XML object var sports:XML = new XML(); // set the ignoreWhite property to true (default value is false) sports.ignoreWhite = true; // After loading is complete, trace the XML object sports.onLoad = function(success) { &#160; trace(sports); }; // load the XML into the sports object sports.load(&#34;http://rss.news.yahoo.com/rss/sports&#34;);]]></description>
			<content:encoded><![CDATA[<div class="syntax_hilite"><strong>ActionScript:</strong>
<div id="as-1">
<div>
<ol style="">// create a new XML object<br />
var sports:XML = new XML();</p>
<p>// set the ignoreWhite property to true (default value is false)<br />
sports.ignoreWhite = true;</p>
<p>// After loading is complete, trace the XML object<br />
sports.onLoad = function(success) {<br />
&nbsp; trace(sports);<br />
};</p>
<p>// load the XML into the sports object<br />
sports.load(&quot;http://rss.news.yahoo.com/rss/sports&quot;);</ol>
</div>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.helmutgranda.com/2005/05/15/loading-a-rss-feed-into-flash/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>Multiple MovieClips only One Script Advanced (Flash MX)</title>
		<link>http://www.helmutgranda.com/2003/07/27/multiple-movieclips-only-one-script-advanced-flash-mx/</link>
		<comments>http://www.helmutgranda.com/2003/07/27/multiple-movieclips-only-one-script-advanced-flash-mx/#comments</comments>
		<pubDate>Mon, 28 Jul 2003 01:06:23 +0000</pubDate>
		<dc:creator>Helmut Granda</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.helmutgranda.com/?p=80</guid>
		<description><![CDATA[Tutorial details: Written by: Helmut Granda , MX Time: 15 minutes Difficulty Level: Intermediate Requirements: Flash MX, READ THIS TREAD Topics Covered: How to avoid writing code inside every single MovieClip and load dynamic content. Assumed knowledge: Variables, Functions, MovieClips, Buttons In our previews tutorial we learned how we can place our code in one [...]]]></description>
			<content:encoded><![CDATA[<p><span class="title"><strong>Tutorial details:<br />
        </strong></span><span class="bodydetails"><strong>Written by:</strong></span> Helmut Granda , MX<br />
            <span class="bodydetails"><strong><br />
            Time:</strong></span> 15 minutes            <span class="bodydetails"><strong><br />
            Difficulty Level:</strong></span> Intermediate<br />
            <span class="bodydetails"><strong><br />
            Requirements:</strong></span> Flash MX, <a href="http://www.humanletter.com/blog/archives/000116.html" target="_top">READ THIS TREAD</a><span class="bodydetails"><strong><br />
            Topics Covered:</strong></span> How to avoid writing code inside<br />
            every single MovieClip and load dynamic content.<br />
            <span class="bodydetails"><strong><br />
            Assumed knowledge:</strong></span> Variables, Functions, MovieClips,<br />
            Buttons               </p>
<p>In our <a href="http://www.humanletter.com/blog/archives/000116.html" target="_top">previews</a> tutorial<br />
          we learned how we can place our code in one place and assign actions<br />
          to severan Movie Clips at once rather than one by one.</p>
<p>and here it is the code to do that:</p>
<p><span id="more-80"></span><br />
<span class="bodycode"><br />
<code language="ActionScript"><br />
//initialize your prototypes<br />
MovieClip.prototype.RollOver = function()<br />
  {<br />
  this.gotoAndPlay(2);<br />
  };</p>
<p>MovieClip.prototype.Release =  function()<br />
  {<br />
  this.gotoAndStop(1);<br />
  MainMovie.gotoAndPlay(2);<br />
  };</p>
<p>MovieClip.prototype.RollOut = function()<br />
  {<br />
  this.gotoAndStop(1);<br />
  ndStop(1);<br />
  };<br />
//assign the prototypes to the Masta!<br />
MovieClip.prototype.Allfunctions  = function(){<br />
	this.onRollOver = RollOver;<br />
	this.onRollOut = RollOut;<br />
	this.onRelease = Release;<br />
}<br />
//Assign the Masta! code to each one of your Movie Clips<br />
for (var i = 1; i <51;i++){<br />
	  this["MC"+i].Allfunctions()<br />
  }</p>
<p></code><br />
</span></p>
<p>Now, how about loading dynamic content? In this case I am going to<br />
          show you how to load txt files, then you can modify the code to load<br />
          swf, jpgs or what ever other information you need in your movie.</p>
<p>The only piece of code we are going to modify is the folowing:</p>
<p>        <span class="bodycode"><br />
<code language="ActionScript"><br />
MovieClip.prototype.Release =  function()<br />
  {<br />
  this.gotoAndStop(1);<br />
  MainMovie.gotoAndPlay(2);<br />
  //this are the 2 lines that we will add to our code<br />
  var finalpath = ("text/" + this._name + ".txt").toLowerCase();<br />
  loadVariables(finalpath,textHolder);<br />
   };<br />
</code><br />
</span></p>
<p>Let me tell you what is going on in the code above with the 2 new lines we<br />
  added.</p>
<p>First of all we declare a new variable called finalpath. We assign the values<br />
  &quot;<strong>text/</strong>&quot; that means that all our files will be stored in the folder named text.<br />
  After that we attach the name of the <strong>MovieClip</strong> by using &quot;<strong>this._name</strong>&quot; the benefit<br />
  of fetching the name automaticly is to save us coding time. And finally we<br />
  add the extension &quot;<strong>.txt</strong>&quot; to our variable.</p>
<p>You might be wondering what is the &quot;<strong>.toLowerCase()</strong>&quot; doing there. Well that<br />
  is just to ensure that the files we are looking for are in lower case. In case<br />
  we named our <strong>MovieClips</strong> some thing like <strong>MywEIrdNameMovieClip</strong>, it will be changed<br />
  to <strong>myweirdnamemovieclip</strong>. That will make it easier for us in naming our files<br />
  and folders.</p>
<p>That is it!. Here it is a preview of how the code works like.</p>
<p>
 <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="402" height="252"><param name="movie" value="http://www.humanletter.com/blog/tutorials/0001/multiplemovieclipsonescriptadvanced.swf"><param name="quality" value="high"><embed src="http://www.humanletter.com/blog/tutorials/0001/multiplemovieclipsonescriptadvanced.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="402" height="252"></embed></object></p>
<p> <a href="../tutorials/0001/hl0001.exe">Download the files self-extract</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.helmutgranda.com/2003/07/27/multiple-movieclips-only-one-script-advanced-flash-mx/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Multiple MovieClips only One Script (Flash MX)</title>
		<link>http://www.helmutgranda.com/2003/07/26/multiple-movieclips-only-one-script-flash-mx/</link>
		<comments>http://www.helmutgranda.com/2003/07/26/multiple-movieclips-only-one-script-flash-mx/#comments</comments>
		<pubDate>Sun, 27 Jul 2003 04:05:43 +0000</pubDate>
		<dc:creator>Helmut Granda</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://www.helmutgranda.com/?p=79</guid>
		<description><![CDATA[Tutorial details: Written by: Helmut Granda , Flash MX Time: 15 minutes Difficulty Level: Intermediate Requirements: Flash MX Topics Covered: How to avoid writing code inside every single MovieClip. Assumed knowledge: Variables, Functions, MovieClips, Buttons S J Mangold Asked at flashnewbie mailing list the following question: I could use some help with the next step [...]]]></description>
			<content:encoded><![CDATA[<p><span class="title"><strong>Tutorial details:<br />
        </strong></span><span class="bodydetails"><strong>Written by:</strong></span> Helmut Granda , Flash MX<br />
            <span class="bodydetails"><strong><br />
            Time:</strong></span> 15 minutes<br />
            <span class="bodydetails"><strong><br />
            Difficulty Level:</strong></span> Intermediate<br />
            <span class="bodydetails"><strong><br />
            Requirements:</strong></span> Flash MX<br />
            <span class="bodydetails"><strong><br />
            Topics Covered:</strong></span> How to avoid writing code inside every single MovieClip.<br />
            <span class="bodydetails"><strong><br />
            Assumed knowledge:</strong></span> Variables, Functions, MovieClips,<br />
            Buttons               </p>
<p>S J Mangold Asked at <a href="http://chattyfig.figleaf.com/" target="_blank">flashnewbie mailing list </a>the following question:</p>
<blockquote>
<p>I could use some help with the next step in my programming education.</p>
<p>I have a set of buttons that typically are enabled/disabled at the same<br />
  time. Currently, I write code for each button. There's got to be a way that<br />
  I can handle this more simply but don't have a clue as to what it would be.</p>
<p>Any help would be greatly appreciated.
</p>
<p>Thanks!</p>
<p>Sue </p>
</blockquote>
<p>There are many ways of solving this problem, you can do it with a function, using the call command or creating a prototype.</p>
<p>We will cover the <strong>prototype</strong> solution.</p>
<p><span id="more-79"></span></p>
<p>Lets pretend we have 50 Buttons on our stage, each button contains the  following script:</p>
<p><span class="bodycode"><br />
<code language="ActionScript"><br />
on (rollOver){<br />
	gotoAndPlay(2);<br />
}</p>
<p>on (rollOut){<br />
	gotoAndStop(1);<br />
}</p>
<p>on (release){<br />
	gotoAndStop(1);<br />
	MainMovie.gotoAndPlay(2);<br />
}<br />
</code><br />
</span></p>
<p>Using the method above will take us a long time to finish our project, and<br />
  if we are required any changes it will be difficult, specially if we are<br />
  required to change the name MainMovie from our target. We would have<br />
  to go to each button and change the script.</p>
<p>Here it is where we introduce the word <b>prototype</b>, in this case we will only use it with our <b>MovieClips</b>. The perfect match, or so I believe!</p>
<p>Now, I am not here to give you a detail information in <strong>prototype</strong>, class, inheritance<br />
  and such. I am here to give you an answer and help you find new ways of coding.</p>
<p>The code is as follows:</p>
<p><span class="bodycode"><br />
  <code language="ActionScript"><br />
MovieClip.prototype.RollOver = function()<br />
  {<br />
  this.gotoAndPlay(2);<br />
  };</p>
<p>MovieClip.prototype.Release =  function()<br />
  {<br />
  this.gotoAndStop(1); MainMovie.gotoAndStop(2);<br />
  };</p>
<p>MovieClip.prototype.RollOut = function()<br />
  {<br />
  this.gotoAndStop(1);<br />
  ndStop(1);<br />
  };<br />
  </code><br />
  </span></p>
<p>If you take a close look to the 2 pieces of code from above you will find<br />
  there is no much difference between both of them. Now you may ask How do I<br />
  attach the second piece of code to each one of my <strong>Movie Clips</strong>?</p>
<p>First of all lets finish our code part and then i show you how to attach the<br />
  code to your <strong>Movie Clips</strong>.</p>
<p><span class="bodycode"><br />
  <code language="ActionScript"><br />
MovieClip.prototype.Allfunctions  = function(){<br />
	this.onRollOver = RollOver;<br />
	this.onRollOut = RollOut;<br />
	this.onRelease = Release;<br />
}<br />
  </code><br />
  </span></p>
<p>That is all you need! Looking at the code above we can see how this.onRollOver<br />
  is equal to Rollover which is the first prototype we defined. Then this.onRollOut<br />
  = RollOut and so on. That was easy uh?</p>
<p>Now it gets better. This is how we attach our script to each one of our <strong>MovieClips</strong>.</p>
<p><span class="bodycode"><br />
<code language="ActionScript"><br />
MovieClip1.Allfunctions();<br />
MovieClip2.Allfunctions();<br />
MovieClip3.Allfunctions();<br />
//....and so on to 50<br />
</code><br />
</span></p>
<p>Now you might say, I don't want to write MovieClip1.Allfunctions(), all the<br />
  way to 50, well we can write another small piece of code that will do that<br />
  for us.</p>
<p><span class="bodycode"><br />
  <code language="ActionScript"><br />
for (var i = 1; i <51;i++){<br />
	  this["MovieClip"+i].Allfunctions()<br />
  }<br />
</code><br />
  </span></p>
<p>Now lets put all our code together:</p>
<p><span class="bodycode"><br />
<code language="ActionScript"><br />
//initialize your prototypes<br />
MovieClip.prototype.RollOver = function()<br />
  {<br />
  this.gotoAndPlay(2);<br />
  };</p>
<p>MovieClip.prototype.Release =  function()<br />
  {<br />
  this.gotoAndStop(1);<br />
  MainMovie.gotoAndStop(2);<br />
  };</p>
<p>MovieClip.prototype.RollOut = function()<br />
  {<br />
  this.gotoAndStop(1);<br />
  };</p>
<p>//assign the prototypes to the Masta!<br />
MovieClip.prototype.Allfunctions  = function(){<br />
	this.onRollOver = RollOver;<br />
	this.onRollOut = RollOut;<br />
	this.onRelease = Release;<br />
};</p>
<p>//Assign the Masta! code to each one of your Movie Clips<br />
for (var i = 1; i <51;i++){<br />
	  this["MC"+i].Allfunctions()<br />
  };</p>
<p></code><br />
</span></p>
<p>Wow!, that was easy, in just a few lines of code we created all of our actions,<br />
  Now we can spend more time making our buttons beautiful rather than programming<br />
  each one of them.</p>
<p>To finish let me tell you, now that we have placed all of our code in one<br />
  place if later on we decided to change the name of our MainMovie all we have<br />
  to do is change it in one place and we are done.</p>
<p>That is it!</p>
<p>I hope you enjoyed it, The next tutorial will cover how to load dynamic content<br />
  with this same approach.</p>
<p>...helmut</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.helmutgranda.com/2003/07/26/multiple-movieclips-only-one-script-flash-mx/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
