<?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>Sumit Gupta &#187; Action Script</title>
	<atom:link href="http://www.sumitgupta.net/category/programming/action-script-programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sumitgupta.net</link>
	<description>bookmarking my life</description>
	<lastBuildDate>Wed, 08 Feb 2012 11:23:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Motion Tween: ActionScript 2.0 with MC Tween</title>
		<link>http://www.sumitgupta.net/motion-tween-actionscript-2-0-with-mc-tween/</link>
		<comments>http://www.sumitgupta.net/motion-tween-actionscript-2-0-with-mc-tween/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 06:27:17 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Action Script]]></category>
		<category><![CDATA[Bookmarked]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=387</guid>
		<description><![CDATA[This is to bookmark the Motion Tween Class I found for AS 2.0. I have use core Tween classes from Macromedia before, but this class looks better in some respect. though with AS 3.0 in market it looks dead stuff http://hosted.zeh.com.br/mctween/]]></description>
			<content:encoded><![CDATA[<p>This is to bookmark the Motion Tween Class I found for AS 2.0. I have use core Tween classes from Macromedia before, but this class looks better in some respect. though with AS 3.0 in market it looks dead stuff</p>
<p><a href="http://hosted.zeh.com.br/mctween/">http://hosted.zeh.com.br/mctween/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/motion-tween-actionscript-2-0-with-mc-tween/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActionScript to change Registration Point of Movie Clip for Dynamically loaded Movie</title>
		<link>http://www.sumitgupta.net/actionscript-to-change-registration-point-of-movie-clip-for-dynamically-loaded-movie/</link>
		<comments>http://www.sumitgupta.net/actionscript-to-change-registration-point-of-movie-clip-for-dynamically-loaded-movie/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 11:03:44 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Action Script]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Prototype]]></category>
		<category><![CDATA[Registration Point]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=338</guid>
		<description><![CDATA[Below is the code I found on some forum that help in changing the registration point of dynamically loaded Images, that help in rotation of movieclip. Basically it only create new _xreg and _yreg points that need to be adjust to change coordinate system before you rotate image/movieclip using _rotation2 variable. It works for Action [...]]]></description>
			<content:encoded><![CDATA[<p>Below is the code I found on some forum that help in changing the registration point of dynamically loaded Images, that help in rotation of movieclip. Basically it only create new _xreg and _yreg points that need to be adjust to change coordinate system before you rotate image/movieclip using _rotation2 variable. </p>
<p>It works for Action Script 2.0. But should work in AS 3.0 as well.</p>
<p><code>var MCP = MovieClip.prototype;<br />
 MCP._xreg = MCP._yreg=0;<br />
 MCP.setPropRel = function(prop, amount) {<br />
  var a = {x:this._xreg, y:this._yreg};<br />
  this.localToGlobal(a);<br />
  this._parent.globalToLocal(a);<br />
  this[prop] = amount;<br />
  var b = {x:this._xreg, y:this._yreg};<br />
  this.localToGlobal(b);<br />
  this._parent.globalToLocal(b);<br />
  this._x -= b.x-a.x;<br />
  this._y -= b.y-a.y;</p>
<p> };<br />
 MCP.set_x2 = function(v) {<br />
  var a = {x:this._xreg, y:this._yreg};<br />
  this.localToGlobal(a);<br />
  this._parent.globalToLocal(a);<br />
  this._x += v-a.x;<br />
 };<br />
 MCP.get_x2 = function() {<br />
  var a = {x:this._xreg, y:this._yreg};<br />
  this.localToGlobal(a);<br />
  this._parent.globalToLocal(a);<br />
  return a.x;<br />
 };<br />
 MCP.set_y2 = function(v) {<br />
  var a = {x:this._xreg, y:this._yreg};<br />
  this.localToGlobal(a);<br />
  this._parent.globalToLocal(a);<br />
  this._y += v-a.y;<br />
 };<br />
 MCP.get_y2 = function() {<br />
  var a = {x:this._xreg, y:this._yreg};<br />
  this.localToGlobal(a);<br />
  this._parent.globalToLocal(a);<br />
  return a.y;<br />
 };<br />
 MCP.set_xscale2 = function(v) {<br />
  this.setPropRel("_xscale", v);<br />
 };<br />
 MCP.get_xscale2 = function() {<br />
  return this._xscale;<br />
 };<br />
 MCP.set_yscale2 = function(v) {<br />
  this.setPropRel("_yscale", v);<br />
 };<br />
 MCP.get_yscale2 = function() {<br />
  return this._yscale;<br />
 };<br />
 MCP.set_rotation2 = function(v) {<br />
  this.setPropRel("_rotation", v);<br />
 };<br />
 MCP.get_rotation2 = function() {<br />
  return this._rotation;<br />
 };<br />
 MCP.get_xmouse2 = function() {<br />
  return this._xmouse-this._xreg;<br />
 };<br />
 MCP.get_ymouse2 = function() {<br />
  return this._ymouse-this._yreg;<br />
 };<br />
 with (MCP) {<br />
  addProperty("_x2", get_x2, set_x2);<br />
  addProperty("_y2", get_y2, set_y2);<br />
  addProperty("_xscale2", get_xscale2, set_xscale2);<br />
  addProperty("_yscale2", get_yscale2, set_yscale2);<br />
  addProperty("_rotation2", get_rotation2, set_rotation2);<br />
  addProperty("_xmouse2", get_xmouse2, null);<br />
  addProperty("_ymouse2", get_ymouse2, null);<br />
 }<br />
 ASSetPropFlags(MCP, null, 1);<br />
 delete MCP;</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/actionscript-to-change-registration-point-of-movie-clip-for-dynamically-loaded-movie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Calling Path in ActionScript</title>
		<link>http://www.sumitgupta.net/calling-path-in-actionscript/</link>
		<comments>http://www.sumitgupta.net/calling-path-in-actionscript/#comments</comments>
		<pubDate>Fri, 28 Aug 2009 06:54:57 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Action Script]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[baseURL]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=266</guid>
		<description><![CDATA[var kLastSlash:Number = _root._url.lastIndexOf('/');
var baseUrl:String = _root._url.substr(0, kLastSlash+1);]]></description>
			<content:encoded><![CDATA[<p>If you ever want to find the Base URL of your website, you can easily find it from URL your SWF is been called. To find the base URL you can use following 2 lines</p>
<blockquote><p>var kLastSlash:Number = _root._url.lastIndexOf(&#8216;/&#8217;);<br />
var baseUrl:String = _root._url.substr(0, kLastSlash+1);</p></blockquote>
<p>now use baseUrl variable where you need.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/calling-path-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>trace() function to work for Browser</title>
		<link>http://www.sumitgupta.net/trace-function-to-work-for-browser/</link>
		<comments>http://www.sumitgupta.net/trace-function-to-work-for-browser/#comments</comments>
		<pubDate>Sun, 26 Jul 2009 17:06:03 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Action Script]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Debug]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=260</guid>
		<description><![CDATA[http://yourpalmark.com/2005/07/01/trace-from-the-browser-using-standard-trace/ I try this article and it actually works. Thanks to Fernando and Ernie, the Flash programmers, who told me about this article and some other great technique to program in ActionScripting.]]></description>
			<content:encoded><![CDATA[<p><a href="http://yourpalmark.com/2005/07/01/trace-from-the-browser-using-standard-trace/">http://yourpalmark.com/2005/07/01/trace-from-the-browser-using-standard-trace/</a></p>
<p>I try this article and it actually works.</p>
<p>Thanks to Fernando and Ernie, the Flash programmers, who told me about this article and some other great technique to program in ActionScripting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/trace-function-to-work-for-browser/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Replace Function for ActionScript 2.0</title>
		<link>http://www.sumitgupta.net/replace-function-for-actionscript-20/</link>
		<comments>http://www.sumitgupta.net/replace-function-for-actionscript-20/#comments</comments>
		<pubDate>Sun, 19 Jul 2009 17:07:14 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Action Script]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Replace]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=257</guid>
		<description><![CDATA[function searchAndReplace(holder, searchfor, replacement) {  temparray = holder.split(searchfor);  holder = temparray.join(replacement);  return (holder); } Do I need to say anything else ?]]></description>
			<content:encoded><![CDATA[<p>function searchAndReplace(holder, searchfor, replacement) {<br />
 temparray = holder.split(searchfor);<br />
 holder = temparray.join(replacement);<br />
 return (holder);<br />
}</p>
<p>Do I need to say anything else ?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/replace-function-for-actionscript-20/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Adding Filters/effect on MovieClip through ActionScript</title>
		<link>http://www.sumitgupta.net/adding-filterseffect-on-movieclip-through-actionscript/</link>
		<comments>http://www.sumitgupta.net/adding-filterseffect-on-movieclip-through-actionscript/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 19:32:18 +0000</pubDate>
		<dc:creator>Sumit Gupta</dc:creator>
				<category><![CDATA[Action Script]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Drop Shadow]]></category>
		<category><![CDATA[Glow Filter]]></category>

		<guid isPermaLink="false">http://www.sumitgupta.net/?p=252</guid>
		<description><![CDATA[How to enter the Filter effects on MovieClip using ActionScript, A developer way.]]></description>
			<content:encoded><![CDATA[<p>Today I need to work to enhance the interface of a Quiz I was trying to build. Suddenly I got an idea to GLOW out the TEXTField and Radio button that need to be fill by user before they move ahead with quiz. I really hate Actionscript because of its inconsistency, but I really love its one (of few) line magic it always does.</p>
<blockquote><p>var myGlowFilter = new flash.filters.GlowFilter();  //Make a Instanace of a Filter that we need to apply<br />
var myFilters:Array = QuizPlaceHolder.AnswerPanel.filters; //Copy existing Filters on this MovieClip<br />
myFilters.push(myGlowFilter); //Insert new Filter to list of Filters<br />
QuizPlaceHolder.AnswerPanel.filters = myFilters; //Apply new filters back to MovieClip</p></blockquote>
<p>Hope you find it useful to make your ActionScript stand against designer&#8217;s Flash. Please note that I test this code using CS 3 with AS 2.0 but I believe it should work with AS 3.0 as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sumitgupta.net/adding-filterseffect-on-movieclip-through-actionscript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

