<?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>Red Graffix Blog &#187; flash</title>
	<atom:link href="http://www.redgraffix.com/blog/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.redgraffix.com/blog</link>
	<description>Blogging on graphic design and web development from Red Graffix</description>
	<lastBuildDate>Tue, 10 Jan 2012 12:29:23 +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>Random # Generator AS3</title>
		<link>http://www.redgraffix.com/blog/2009/12/24/random-number-generator-as3/</link>
		<comments>http://www.redgraffix.com/blog/2009/12/24/random-number-generator-as3/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 14:52:59 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[random number generator]]></category>

		<guid isPermaLink="false">http://redgraffix.com/blog/?p=169</guid>
		<description><![CDATA[I recently  created a game that needed a random number generator. Searching the internet, I found many ways to create one. Some seemed overly complicated, but I came across this and it seems to work perfectly, at least for the application I used it in. What I was trying to do was create random behavior [...]]]></description>
			<content:encoded><![CDATA[<img src="http://redgraffix.com/blog/wp-content/uploads/2009/12/actionscripticon_400-300x300-150x150.png" alt="Action Script 3" title="actionscripticon_400-300x300" width="150" height="150" class="alignright size-thumbnail wp-image-219" /><p>I recently  created a game that needed a random number generator. Searching the internet, I found many ways to create one. Some seemed overly complicated, but I came across this and it seems to work perfectly, at least for the application I used it in. What I was trying to do was create random behavior for the computer AI when fighting the human player. The way this works is I created a movie clip with all the monster's animations for his different behaviors. so from from<span id="more-169"></span> frame 2-20 is his standing still behavior, 21-40 is his attack behavior, 41-60 is dodging behavior, and so on.</p>
<p>I then labeled keyframes with still, attack, dodge, etc.  As  for the action script, on frame one I put this bit of code</p>

<code>var randNum:Number=Math.floor(Math.random()*4)+1;</code>

<p>What this does is create a random number, 1-4.  First it creates a variable "randNumber" which then must be defined as a number , that is a whole number "floor" ,  that is randomly 0-3. We have to remember computers always start with 0 not 1, so that's why there's that +1 at the end otherwise we'd have numbers 0-3 as our output even though we put 4 as the highest place. With the +1 it adds 1 to the output number making them go from 1-4.</p>

<p>From here we need tell the computer what to do with these random numbers. So we add this bit of code after it.</p>

<code>

if(randNum==1){gotoAndPlay("still")};

if(randNum==2){gotoAndPlay("attack")};

if(randNum==3){gotoAndPlay("dodge")};

if(randNum==4){gotoAndPlay("still")};
</code>
<p>Whats going on here is a simple set of if statements. if the variable we created earlier is 1 then our movie clip jumps to the frame labeled "still", if it's 2 it jumps to "attack",  and so on. I realized to make the game a little easier, I should have the monster stand still more often so the player can attack that's why "still" is called twice. He's more likely to stand still than do anything else.</p>
<p>So basically, a random number is generated in frame 1 that tells the movieclip where to jump to, it plays those set of frames, then at the end of those set of frames I send the play head back to frame one with 
<code>gotoAndStop(1);</code>
 to go and do it all over again. There's more code to go along with this, like testing to see if the monster hit's the player when he's attacking, figuring out how much life is lost when hit, and other things I'll save for another day. I'm not saying this is a great way to do things, but it worked for me. </p>]]></content:encoded>
			<wfw:commentRss>http://www.redgraffix.com/blog/2009/12/24/random-number-generator-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Robo Samurai Game</title>
		<link>http://www.redgraffix.com/blog/2009/12/15/robo-samurai-game/</link>
		<comments>http://www.redgraffix.com/blog/2009/12/15/robo-samurai-game/#comments</comments>
		<pubDate>Tue, 15 Dec 2009 16:09:32 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[Game]]></category>

		<guid isPermaLink="false">http://redgraffix.com/blog/?p=154</guid>
		<description><![CDATA[I created a game to insert in to my final presentation for my 2d animation class because I found out i was missing some things for the final.  This is a simple little little game. you're a robot samurai and you fight stuff. Right now it's only one level and the battle system is very [...]]]></description>
			<content:encoded><![CDATA[<a href="http://redgraffix.com/#multimedia"><img class="alignright size-full wp-image-155" title="robosamurai" src="http://redgraffix.com/blog/wp-content/uploads/2009/12/robosamurai.jpg" alt="robosamurai" width="150" height="150" /></a><p>I created a game to insert in to my final presentation for my 2d animation class because I found out i was missing some things for the final.  This is a simple little little game. you're a robot samurai and you fight stuff. Right now it's only one level and the battle system is very basic.</p>
 <p>But I would like to make the fighting a little more complex, add leveling up<span id="more-154"></span> after fights and of course, make more monsters with smarter AI. Time constraints limited me from doing those things. I'm  happy with what I've got so far, I built this from scratch in 4 days, so I feel that's pretty good for being a flash novice.  The monster's behavior is based off a random number generator, so basically when a number comes up, he has a behavior assigned to that number and performs the animation to coincide with it.  </p><p>I think I was probably very influenced by games like final fantasy 1-5, chrono trigger, and other old school rpg's in the way the battle system works and with where I would like it to go.  By the way, that's my school in the background there.  click on the picture and you'll go to my portfolio site where you can play this.</p>]]></content:encoded>
			<wfw:commentRss>http://www.redgraffix.com/blog/2009/12/15/robo-samurai-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>2d Flash Animation Final</title>
		<link>http://www.redgraffix.com/blog/2009/12/07/2d-flash-animation-final/</link>
		<comments>http://www.redgraffix.com/blog/2009/12/07/2d-flash-animation-final/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 17:20:36 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[school]]></category>

		<guid isPermaLink="false">http://redgraffix.com/blog/?p=147</guid>
		<description><![CDATA[After many sleepless nights and a semester of trying to figure out AS3, I'm just about done. I finished my final for my 2d animation class. It's a flash based application which loads my other class projects externally and is a display of my skills learned over the semester. I tried to think out of [...]]]></description>
			<content:encoded><![CDATA[<img src="http://redgraffix.com/blog/wp-content/uploads/2009/12/fianl2d1-150x150.gif" alt="2d final" title="fianl2d" width="150" height="150" class="alignleft size-thumbnail wp-image-149" /><p>After many sleepless nights and a semester of trying to figure out AS3, I'm just about done. I finished my final for my 2d animation class. It's a flash based application which loads my other class projects externally and is a display of my skills learned over the semester.</p>
<p>I tried to think out of the box with this one, instead of having <span id="more-147"></span>a static menu and a view screen, I tried to create a little environment for the user to interact with. I illustrated everything in what I consider "my style", influenced by artists like M.C.Escher, Albrecht Duurer, Todd Mcfarlane, and R.Crumb. I love lots of contrast in the use of creating shadow and form. I also attempted to add many little subtle nuances such as a blur on object as the come into view, to give the effect of speed and motion.</p>
<p> Also fading out background elements when a selection is made to direct focus and get rid of background distractions. I tried to add little "easter eggs" in on some background elements just for fun. I would have liked to add more but there are time constraints and I do have other projects to do also.</p><p>
I also had to do more action script programming than previous projects to have an added level of interactivity. I had a big problem with my earlier projects creating bugs when loaded into my final. Because the beginner projects were so rudimentary, much of the sound and script in it had to be reworked. I spent a couple days banging my head against a wall trying to figure out were my final was creating bugs and it ended up being caused by my first project when it got loaded in for viewing.
Anyways, here it is. A show of all the animating skills learned over the course of one semester in 2d animation at Cuyahoga Community College.</p>
<a href="http://redgraffix.com/#multimedia"><img class="aligncenter size-full wp-image-149" title="fianl2d" src="http://redgraffix.com/blog/wp-content/uploads/2009/12/fianl2d1.gif" alt="fianl2d" width="400" height="272" /></a>

<p>Click the image  and you'll be taken to my portfolio page where this project is at. Enjoy!!</p>]]></content:encoded>
			<wfw:commentRss>http://www.redgraffix.com/blog/2009/12/07/2d-flash-animation-final/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keeping Time With Klock</title>
		<link>http://www.redgraffix.com/blog/2009/11/27/keeping-time-with-klock/</link>
		<comments>http://www.redgraffix.com/blog/2009/11/27/keeping-time-with-klock/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 16:19:51 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[air]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[workflow]]></category>

		<guid isPermaLink="false">http://redgraffix.com/blog/?p=143</guid>
		<description><![CDATA[Adobe air application "Klock" is a very nice little time tracking program, perfect for the freelancer trying to keep record of their work flow. I found it incredibly useful, as I'm just getting started in my new career field of web design and don't always have the best idea of how long a project might [...]]]></description>
			<content:encoded><![CDATA[<img alt="" src="http://klok.mcgraphix.com/klok/images/screenshot.png" class="alignleft" width="150" height="150" /><p>Adobe air application "Klock" is a very nice little time tracking program, perfect for the freelancer trying to keep record of their work flow. I found it incredibly useful, as I'm just getting started in my new career field of web design and don't always have the best idea of how long a project might take. You can think of this application as a fancy punch clock. It keeps detailed track of how you spent your time, on multiple projects.</p>
<p> You start by entering client/ job info, and a time frame estimate.<span id="more-143"></span> Then you simply clock in to a particular project you may be working on, and when you're done you clock out. You can add details in like, working on design mockup, or emailing client, or whatever you choose. Klock then takes this info and creates timelines, graphs, and pie charts. I can now see exactly how long I spent creating the print style sheet for a site, or compare over all I spent 10 hours on john doe's site to 12 hours on jane smiths site. Very useful stuff for OCD people like me that like to tack everything.</p><p> The best part is it's FREE!! I think this application could be useful to many people, not just a web designer like me. A graphic artist could use it to track their time spent on a magazine ad, or photography could track time retouching photos, a developer writing code, etc. If you take a few seconds to set up things like this at the start of a project, you be glad you did down the road.</p>
<p><a href="http://klok.mcgraphix.com/klok/index.htm">KLOCK homepage</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.redgraffix.com/blog/2009/11/27/keeping-time-with-klock/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cox Cable E-card</title>
		<link>http://www.redgraffix.com/blog/2009/11/11/cox-cable-e-card/</link>
		<comments>http://www.redgraffix.com/blog/2009/11/11/cox-cable-e-card/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 16:57:44 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Projects]]></category>
		<category><![CDATA[animation]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[school]]></category>

		<guid isPermaLink="false">http://redgraffix.com/blog/?p=134</guid>
		<description><![CDATA[Here's a holiday E-card I made for a local cable company.  I tried to make it as non denominational as possible since it's getting sent out to a wide variety of people. I do the snowman's voice and my son did the kid's voice. I know the sound quality isn't amazing, but hey,  I don't [...]]]></description>
			<content:encoded><![CDATA[<a href="http://redgraffix.com/projects/Rodgers_Jason_coxcard.html"><img src="http://redgraffix.com/blog/wp-content/uploads/2009/11/coxcard.gif" alt="coxcard" title="coxcard" width="150" height="150" class="alignright" /></a><p>Here's a holiday E-card I made for a local cable company.  I tried to make it as non denominational as possible since it's getting sent out to a wide variety of people.</p><p> I do the snowman's voice and my son did the kid's voice. I know the sound quality isn't amazing, but hey,  I don't have a proffesional recording studio in my attic. sorry. The list of holidays <span id="more-134"></span>I thought was amusing. A lot of the holidays are fictional from movies and tv,  fitting i think since it's for a cable company.</p>
<p>In case you missed them, here's the list of holidays I used.</p>
<ul>
	<li>Hanukkah</li>

	<li>Eid ul-Adha</li>
<li>Advent</li>

<li>Christmas</li>
<li>Chinese New Year</li>
<li>Winter Solstice</li>
<li>Bodhi Day</li>
<li>Imbolc</li>
<li>Hand Washing Awareness Week</li>
<li>Dong zhi</li>
<li>Civil Aviation Day</li>
<li>Diwali</li>
<li>Holy Innocents' Day</li>
<li>Ice Cream and Violins Day</li>
<li>Yule</li>
<li>Read A New Book Month </li>
<li>Samhain</li>
<li>Eat A Red Apple Day</li>
<li>Inti Raymi</li>
<li>Refrigerator Day</li>
<li>Aplastic Anemia Awareness Week</li>
<li>Eastern Orthodox Christmas</li>
<li>AIDS Awareness Day</li>
<li>Saturnalia</li>
<li>Sadeh</li>
<li>St. Valentine's Day</li>
<li>Matariki</li>
<li>Forefathers' Day</li>
<li>Coats For Kids Days</li>
<li>Feast of Fools</li>
<li>Pearl Harbor Day</li>
<li>Kwanzaa</li>
<li>Feast of Winter Veil</li>
<li>Hogmanay</li>
<li>St. Lucy Day</li>
<li>Yulefest</li>
<li>Volunteer Day</li>
<li>Stress Free Family Holiday Month</li>
<li>Rosa Parks Day</li>
<li>Burns Night</li>
<li>Festival du Voyageur</li>
<li>Christmas Eve</li>
<li>GERD Awareness Week </li>
<li>New Year's Eve</li>
<li>Muhurram</li>
<li>Groundhog Day</li>
<li>Watch Night</li>
<li>Saint Nicholas' Day</li>
<li>Freezingman</li>
<li>Life Day</li>
<li>Armenian Apoststolc Christmas</li>
<li>Lupercalia</li>
<li>Saint John the Evangelist's Day</li>
<li>Britney Spears birthday</li>
<li>Festivus</li>
<li>Human Rights Day</li>
<li>Chahar Shanbeh Suri</li>
<li>Yalda</li>
<li>Poinsettia Day</li>
<li>Holiday</li>
<li>Kwansolhaneidmas</li>
<li>Modranect</li>
<li>Maritime Day</li>
<li>Bhaubeej</li>
<li>Hi Neighbor Month</li>
<li>Boxing Day</li>
<li>Winter Solstice</li>
<li>Saint Basil's Day</li>
<li>Karachun</li>
<li>Starlight Celebration</li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://www.redgraffix.com/blog/2009/11/11/cox-cable-e-card/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

