<?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>theDeSilva.com&#187; flash actionscript</title>
	<atom:link href="http://www.thedesilva.com/tag/flash-actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thedesilva.com</link>
	<description>Andrew de Silva</description>
	<lastBuildDate>Tue, 26 Apr 2011 20:24:19 +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>Flash Bitmap maximum width and height</title>
		<link>http://www.thedesilva.com/2008/08/bitmap-maximum-width-and-height/</link>
		<comments>http://www.thedesilva.com/2008/08/bitmap-maximum-width-and-height/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 16:11:33 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[bitmapdata]]></category>
		<category><![CDATA[flash actionscript]]></category>
		<category><![CDATA[image size]]></category>
		<category><![CDATA[maximum height]]></category>
		<category><![CDATA[maximum width]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=48</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flash_small.png" width="32" height="32" alt="" title="Flash" /><br/>An updated post has been posted , check it out at [Workaround] Flash Bitmap maximum width and height Recently I was working with a flash image zoom application and realized that after launching the application it kept crashing when it was loading the larger image, I&#8217;ve checked every where and nothing seems to be wrong. [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flash_small.png" width="32" height="32" alt="" title="Flash" /><br/><div class="redbox">An updated post has been posted , check it out at <a title="[Workaround] Flash Bitmap maximum width and height" href="http://www.thedesilva.com/2008/08/workaround-flash-bitmap-maximum-width-and-height/ " target="_self">[Workaround] Flash Bitmap maximum width and height</a></div>
<p>Recently I was working with a flash image zoom application and realized that after launching the application it kept crashing when it was loading the larger image, I&#8217;ve checked every where and nothing seems to be wrong. File name , image size , file location were all correct. After awhile I realized that the maximum width and maximum height of a BitmapData object is 2880 pixels.  The image that I was working with was way more bigger than that.  Anything that has a height and width that is larger than 2880 will cause flash unable to redraw the bitmap.</p>
<p><span id="more-48"></span></p>
<p>Here&#8217;s what Adobe has to say about the maximum width and height</p>
<blockquote><p><strong>Note:</strong> The maximum dimensions of a bitmap in Flash Player is limited to 2880 pixels in either direction (width or height). If you attempt to create a BitmapData instance that is larger than this restriction, the Bitmap will not be created. This limit is in place to keep people from creating Flash movies that gobble up the client&#8217;s RAM. A bitmap that is 2880 x 2880 pixels, will use roughly 32MB of RAM.</p></blockquote>
<p>Also interestingly enough</p>
<blockquote><p>An instance of the BitmapData object can eat up the viewer&#8217;s memory quickly. Every pixel in a bitmap is stored using 4 bytes of memory (1 byte per color channel ARGB). If you create a bitmap that is 500 x 500 pixels in size, it will take up close to 1MB of RAM. If you don&#8217;t need a BitmapData object anymore, then it is good practice to free the memory that the bitmap is using. The BitmapData class has a method that enables you to do just this, the dispose() method.</p></blockquote>
<p>So the solution to remove unwanted BitmapData object is to use the following</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">myBitmap.<span style="color: #006600;">dispose</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2008/08/bitmap-maximum-width-and-height/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s been awhile</title>
		<link>http://www.thedesilva.com/2008/05/its-been-awhile/</link>
		<comments>http://www.thedesilva.com/2008/05/its-been-awhile/#comments</comments>
		<pubDate>Mon, 05 May 2008 03:33:14 +0000</pubDate>
		<dc:creator>Andrew de Silva</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[arcade games]]></category>
		<category><![CDATA[flash action script]]></category>
		<category><![CDATA[flash actionscript]]></category>
		<category><![CDATA[object oriented programming language]]></category>

		<guid isPermaLink="false">http://www.thedesilva.com/?p=32</guid>
		<description><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flash_small.png" width="32" height="32" alt="" title="Flash" /><br/>Wow , I just realized how long since I&#8217;ve actually written a post here. I&#8217;ve been extremely busy with work lately and I have not got a chance to update with my blog. I&#8217;ve been working with more .NET stuff than ever at work and also attended a Flash ActionScript 3 class. ActionScript 3 is [...]]]></description>
			<content:encoded><![CDATA[<img src="http://www.thedesilva.com/img/category_icon//flash_small.png" width="32" height="32" alt="" title="Flash" /><br/><p>Wow , I just realized how long since I&#8217;ve actually written a post here. I&#8217;ve been extremely busy with work lately and I have not got a chance to update with my blog. I&#8217;ve been working with more .NET stuff than ever at work and also attended a Flash ActionScript 3 class.</p>
<p>ActionScript 3 is a powerful, object-oriented programming language that signifies an important step in the evolution of the capabilities of the Flash Player runtime. ActionScript 3 is a complete re-write of ActionScript 2.ActionScript is executed by the ActionScript Virtual Machine (AVM) built into the Flash Player.</p>
<p>Hopefully I&#8217;ll find some time to work on some update on my own site. It&#8217;s been a little challenging to work on updates on my own site while working on my regular job and maintaining my other websites.</p>
<p>Oh and embedded on this post you will find the Asteroid Game that was part of my Flash Action Script class objective. <em><strong>Asteroids</strong></em> is a video arcade game released in 1979 by Atari Inc. It was one of the most popular and influential games of the <span class="mw-redirect">Golden Age of Arcade Games</span>. Asteroids uses vector graphics and a two-dimensional view that wraps around in both screen axes. The player controls a spaceship in an asteroid field which is periodically traversed by flying saucers. The object of the game is to shoot and destroy asteroids and saucers while not colliding with either, or being hit by the saucers&#8217; counter-fire.</p>
<p>Control the spaceship using your arrow keys , fire with shift button and warp using the spacebar. I couldn&#8217;t help it but to make a little change to the game by adding forcefield. Ctrl key to turn on force field and caps key to turn it off. If you want to restart the game , you will have to refresh the page. I know it&#8217;s LAME but I can&#8217;t be coding more into this Asteroid game when I have ton of work to finish up now. Maybe by the end of the week, I&#8217;ll put in some effort to make it &#8216;nicer&#8217;.</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_asteroids_306822282"
			class="flashmovie"
			width="500"
			height="500">
	<param name="movie" value="http://thedesilva.com/wp-content/uploads/2008/05/asteroids.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://thedesilva.com/wp-content/uploads/2008/05/asteroids.swf"
			name="fm_asteroids_306822282"
			width="500"
			height="500">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://www.thedesilva.com/2008/05/its-been-awhile/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

