<?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>Webomatica &#187; Web Design</title>
	<atom:link href="http://www.webomatica.com/wordpress/category/web-design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webomatica.com/wordpress</link>
	<description>Entertainment and Tech Digest</description>
	<lastBuildDate>Sun, 12 Feb 2012 20:34:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Flash Notes: Simple Button Group With Tweener</title>
		<link>http://www.webomatica.com/wordpress/2008/07/10/flash-notes-simple-button-group-with-tweener/</link>
		<comments>http://www.webomatica.com/wordpress/2008/07/10/flash-notes-simple-button-group-with-tweener/#comments</comments>
		<pubDate>Thu, 10 Jul 2008 14:29:05 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/?p=1939</guid>
		<description><![CDATA[This example builds on <a href="http://www.webomatica.com/wordpress/2008/06/30/flash-notes-simple-button-group/">the previous button group example</a> - essentially a group of buttons that have a "disabled" state indicating which button was clicked last, and some animation effects courtesy of Tweener.]]></description>
			<content:encoded><![CDATA[<p>This example builds on <a href="http://www.webomatica.com/wordpress/2008/06/30/flash-notes-simple-button-group/">the previous button group example</a> — essentially a group of buttons that have a “disabled” state indicating which button was clicked last, and some animation effects courtesy of Tweener.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="475" height="100" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://www.webomatica.com/widgets/button_group_tweener.swf" /><embed type="application/x-shockwave-flash" width="475" height="100" src="http://www.webomatica.com/widgets/button_group_tweener.swf"></embed></object></p>
<p><a href="http://www.webomatica.com/widgets/button_group_tweener.zip">Download the files</a></p>
<p>These are the new concepts:</p>
<ol>
<li>Place library items on the Stage dynamically using addChild</li>
<li>create array and put button instances in it</li>
<li>apply tweener to those instances (event.currentTarget)</li>
</ol>
<p>In the previous example I put the buttons on the Stage manually and added their instance names. When dealing with a bunch of objects, it’s generally better to do this dynamically. In AS2, you’d use attachMovie. AS3 uses addChild.</p>
<p>To set up an object in the library for addChild, get its Symbol Properties and check the box “Export for ActionScript”. With this example, the symbol now has a class of “button”. The code to place an instance of “button” on the Stage is:</p>
<pre>var myInstance = new button();
addChild(myInstance);</pre>
<p>You can then manipulate the button via the var myInstance:</p>
<pre>myInstance.y = 30;
myInstance.alpha = 0.5;</pre>
<p>Anyhow, since I want to manage a bunch of buttons, I created an array and put all button instances in there using a loop within an “init” function — that key bit of code is “buttons_array[i] = myinstance;”. total_buttons is defined as a variable at the top of the script. Note I also added event listeners to all the buttons. Since all the buttons have the same behavior, I can assign it in the for loop:</p>
<pre>var buttons_array:Array = new Array(); // array to put button instances</pre>
<pre>function init ():void{
for (var i=0; i &lt; total_buttons; i++){
var myInstance = new button();
addChild(myInstance);
myInstance.x = ((60 * i) + 30); // spreads the buttons out horizontally
myInstance.y = 30;
myInstance.alpha = 0.5;
myInstance.buttonMode = true;
myInstance.mouseChildren = false; // keep textfield from responding to the mouse
myInstance.name_txt.text = (i + 1);
myInstance.addEventListener(MouseEvent.ROLL_OVER, myButtonOver);
myInstance.addEventListener(MouseEvent.MOUSE_DOWN, myButtonDown);
myInstance.addEventListener(MouseEvent.MOUSE_UP, myButtonUp);
myInstance.addEventListener(MouseEvent.ROLL_OUT, myButtonOut);
buttons_array[i] = myInstance;
}
}</pre>
<pre>init();</pre>
<p>Next, the event listeners are defined in the normal fashion, but I added some animation using <a href="http://code.google.com/p/tweener/">Tweener, a simple way to add animation effects</a>. I’ve talked about installing and using Tweener before.</p>
<pre>function myButtonOver (event:MouseEvent):void{
Tweener.addTween(event.currentTarget, {alpha:1, scaleY:1.5, time:0.2, transition:"linear"});
}</pre>
<p>The above function is called whenever the cursor rolls over a button. The key conecpt is “event.currentTarget” which applies the tween to the button that’s calling the event (as opposed to “this”). The parameters to create the tween should be pretty self-explanatory; for more check out the <a href="http://hosted.zeh.com.br/tweener/docs/en-us/">Tweener documentation</a>.</p>
<p>It’s also necessary to  define the functions myButtonDown, myButtonUp, and myButtonOut — and a “reset_buttons” function should be called within myButtonUp.</p>
<p>Lastly, the reset buttons to get the buttons to behave as a group is slightly different. Instead of walking through the instance names, the loop runs through the array instead:</p>
<pre>function reset_buttons ():void{
for(var j:uint = 0; j &lt; total_buttons; j++){
Tweener.addTween(buttons_array[j], {alpha:0.5, scaleY:1, time:0.2, transition:"linear"});
buttons_array[j].buttonMode = true;
buttons_array[j].gotoAndStop("_up");
}
}</pre>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2008/07/10/flash-notes-simple-button-group-with-tweener/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Notes: Simple Button Group</title>
		<link>http://www.webomatica.com/wordpress/2008/06/30/flash-notes-simple-button-group/</link>
		<comments>http://www.webomatica.com/wordpress/2008/06/30/flash-notes-simple-button-group/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 13:46:06 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/?p=1891</guid>
		<description><![CDATA[After <a href="http://www.webomatica.com/wordpress/2008/05/10/flash-notes-properties-button-event-listeners/">getting one button to work</a>, you can get several to work together, in what's called a "button group." This is a pretty common UI situation where you have several buttons but each has a "disabled" state indicating it was the last one the user clicked on. The button stays in this state until the user clicks on another button. As an added feature, the instance name of the last button clicked appears on the Stage.]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://www.webomatica.com/wordpress/2008/05/10/flash-notes-properties-button-event-listeners/">getting one button to work</a>, you can get several to work together, in what’s called a “button group.” This is a pretty common UI situation where you have several buttons but each has a “disabled” state indicating it was the last one the user clicked on. The button stays in this state until the user clicks on another button. As an added feature, the instance name of the last button clicked appears on the Stage.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="475" height="100" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="src" value="http://www.webomatica.com/widgets/simple_button_group.swf" /><embed type="application/x-shockwave-flash" width="475" height="100" src="http://www.webomatica.com/widgets/simple_button_group.swf" quality="high"></embed></object></p>
<p><a href="http://www.webomatica.com/widgets/simple_button_group.zip">Download the files</a></p>
<p>To start, I created a button symbol on the Stage and set it up with keyframes labelled _up, _over, _down, and disabled. Each keyframe can have different art depicting these button states. I then added a layer for the button’s name with a textfield with the instance name “name_txt”. Lastly, there’s a stop action on the first keyframe of the button.</p>
<p><img class="wgborder" src="http://www.webomatica.com/wordpress/images/blog/button_group.jpg" alt="Button Group" width="493" height="239" /></p>
<p>Then copy four instances of the button on the Stage, and label them “button_1”, “button_2”, “button_3”, and “button_4”.</p>
<p>Now everything else can be done with ActionScript. Here’s an init function which sets up the listeners for the four buttons:</p>
<pre>function init ():void{
for(var i:uint = 1; i &lt; 5; i++){
this["button_" + i].name_txt.text = i;
this["button_" + i].buttonMode = true;
this["button_" + i].mouseChildren = false;
this["button_" + i].addEventListener(MouseEvent.ROLL_OVER, myButtonOver);
this["button_" + i].addEventListener(MouseEvent.MOUSE_DOWN, myButtonDown);
this["button_" + i].addEventListener(MouseEvent.MOUSE_UP, myButtonUp);
this["button_" + i].addEventListener(MouseEvent.ROLL_OUT, myButtonOut);
}
this.getChildByName("button_1").dispatchEvent(new MouseEvent(MouseEvent.MOUSE_UP));
}

init();</pre>
<p><em>Note:</em> “mouseChildren = false” is used to keep the button’s textfield from reacting to the mouse.</p>
<p><em>Note:</em> The “dispatchEvent” line sends the mouse event “MOUSE_UP” to the button with the instance name of “button_1”. This is the equivalent of button_1.onRelease(); I added this so when the movie is first played, “button_1” is triggered.</p>
<p>The most important mouse event function is “myButtonUp” — triggered when the button is clicked and released — which is defined as follows:</p>
<pre>function myButtonUp (event:MouseEvent):void{
	reset_buttons();
	event.currentTarget.buttonMode = false;
	event.currentTarget.gotoAndStop("disabled");
	content_txt.text = event.currentTarget.name;
}</pre>
<p>The myButtonUp function is assigned to all four buttons. When the user clicks and releases a button, five things happen:</p>
<ul>
<li>All the buttons are “enabled” (the function “reset_buttons”).</li>
<li>The clicked-on button is set to not show the hand cursor by turning off buttonMode (note the use of “event.currentTarget” rather than “this”.</li>
<li>The clicked-on button is turned red.</li>
<li>The clicked-on button’s name is displayed in a textfield with the instance name “content_txt.text”.</li>
</ul>
<p>Lastly, here’s the “reset_buttons” function:</p>
<pre>function reset_buttons ():void{
	for(var j:uint = 1; j &lt; 5; j++){
		this["button_" + j].buttonMode = true;
		this["button_" + j].gotoAndStop("_up");
	}
}</pre>
<p>When called, it basically loops through the buttons and enables them by turning on button mode, and telling the button to go to its “_up” state.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2008/06/30/flash-notes-simple-button-group/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash Notes: Setting Up An External Class File</title>
		<link>http://www.webomatica.com/wordpress/2008/05/20/flash-notes-setting-up-an-external-class-file/</link>
		<comments>http://www.webomatica.com/wordpress/2008/05/20/flash-notes-setting-up-an-external-class-file/#comments</comments>
		<pubDate>Tue, 20 May 2008 13:58:18 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/?p=1850</guid>
		<description><![CDATA[Here's how to create a external class using ActionScript 3. In AS2, I was already familiar with instances of objects in the library. Defining a class is basically the same thing.

Why would you want to do this? In a sense, this is where AS3 as an object oriented programming language has finally been realized. You can create a class (object) with its own properties, completely self-contained in an external AS file, making it portable across .fla files. You could code the class so it "draws itself" (not as I have done below) so it wouldn't even require a symbol in the library to attach to. But I'll keep this example simple to communicate the concept.]]></description>
			<content:encoded><![CDATA[<p>Here’s how to create a external class using ActionScript 3. In AS2, I was already familiar with instances of objects in the library. Defining a class is basically the same thing.</p>
<p>Why would you want to do this? In a sense, this is where AS3 as an object oriented programming language has finally been realized. You can create a class (object) with its own properties, completely self-contained in an external AS file, making it portable across .fla files. You could code the class so it “draws itself” (not as I have done below) so it wouldn’t even require a symbol in the library to attach to. But I’ll keep this example simple to communicate the concept.</p>
<p>I’ll define a class called “button”. It applies to a symbol I created in the library of an .fla file. That symbol is just a circle with textfield (instance name “label_txt”), converted to a movie clip.</p>
<p>To assign a class to a symbol in the library, select it in the library, call up its properties, and click “Export for ActionScript”. In the dialog box that appears, enter the desired class name in the appropriate field. My class is named “button”. Note the information that appears in the base class field — in this case, it’s “flash.display.MovieClip”. The class I’ll write will be an extension of that display type.</p>
<p><img class="wgborder" src="http://www.webomatica.com/wordpress/images/blog/flash_simple_class.jpg" alt="null" width="500" height="246" /></p>
<p>I then created an ActionScript file and saved it as “button.as” in the same directory as the .fla file. The .fla file will look for this file when you create the .swf. Here’s the code:</p>
<pre><code>package{
import flash.display.MovieClip;
import flash.text.*;

public class button extends MovieClip{
public function button(xPos:Number, yPos:Number, scaling:Number, label:String){
this.x = xPos;
this.y = yPos;
this.scaleX = scaling;
this.scaleY = scaling;
this.label_txt.text = label;
}
}
}</code></pre>
<p><a href="http://www.webomatica.com/wordpress/2008/05/18/flash-notes-setting-up-an-external-actionscript-file/">Similarly to a document class</a>, the import statements handle the elements of the button symbol in the library (movie clip, text field). The public class button extends the symbol type this class is assigned to (movie clip). Within the button function, I’m accepting five properties which are then used to change the look of the button. The first and second properties are the x and y location, the next two properties its scale on the x and y axis, and the last property is some text for its label.</p>
<p>Then in the .fla I added this code:</p>
<pre><code>stage.addEventListener(MouseEvent.MOUSE_UP, reset_btnUp);

function reset_btnUp(event:MouseEvent):void{
	reset_everything();
}

function reset_everything():void{
var button_1 = new button(Math.random() * 500, Math.random() * 400,
 Math.random() * 5, "This");
var button_2 = new button(Math.random() * 500, Math.random() * 400,
 Math.random() * 5, "Button");
var button_3 = new button(Math.random() * 500, Math.random() * 400,
 Math.random() * 5, "Is");
var button_4 = new button(Math.random() * 500, Math.random() * 400,
 Math.random() * 5, "A");
var button_5 = new button(Math.random() * 500, Math.random() * 400,
 Math.random() * 5, "Class");

addChild(button_1);
addChild(button_2);
addChild(button_3);
addChild(button_4);
addChild(button_5);
}

reset_everything();</code></pre>
<p>The mouse up event listener is assigned to the stage instead of a button. By doing this, the “reset_everything” function is called whenever the user clicks anywhere on the stage. The “reset_everything” function creates five instances of the button class and passes parameters which are used by the class to define the look of the button (properties of that class).</p>
<p>Note that random numbers are generated differently in AS3, using Math.random() * #. Also, the new instance is added to the stage using addChild (no more loadMovie) via the variable to which the new class instance was assigned.</p>
<p>To sum up, each time the user clicks on the stage, five instances of the button class will appear, with random position and size, and the words “This” “Button” “Is” “A” “Class” on them.</p>
<p>Here’s the example; click away:</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="500" height="400" id="simple_class" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="http://www.webomatica.com/widgets/simple_class.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#cccccc" /><embed src="http://www.webomatica.com/widgets/simple_class.swf" quality="high" bgcolor="#cccccc" width="500" height="400" name="simple_class" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br />
	</object></p>
<p>Notes to self:</p>
<ol>
<li>You can pass parameters to external class files when you instantiate the class.</li>
<li>The external class file name must be the same as the class being defiend.</li>
<li>You can add event listeners to the stage.</li>
<li>random(#) has been replaced with Math.random() * #.</li>
<li>loadMovie has been replaced with addChild.</li>
</ol>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2008/05/20/flash-notes-setting-up-an-external-class-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Notes: Preloader</title>
		<link>http://www.webomatica.com/wordpress/2008/05/19/flash-notes-preloader/</link>
		<comments>http://www.webomatica.com/wordpress/2008/05/19/flash-notes-preloader/#comments</comments>
		<pubDate>Mon, 19 May 2008 14:57:58 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/?p=1849</guid>
		<description><![CDATA[Here's how to create a preloader in ActionScript 3. The AS2 methods have been thrown out and the new model uses event listeners.

"loaderInfo" is the general state of the SWF as it's loaded. While it's loading, you get a progress event, and upon completion, a complete event. Here's some sample code:]]></description>
			<content:encoded><![CDATA[<p>Here’s how to create a preloader in ActionScript 3. The AS2 methods have been thrown out and the new model uses event listeners.</p>
<p>“loaderInfo” is the general state of the SWF as it’s loaded. While it’s loading, you get a progress event, and upon completion, a complete event. Here’s some sample code:</p>
<pre><code>loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
loaderInfo.addEventListener(Event.COMPLETE, completeListener);

function progressListener(event:ProgressEvent):void {
	bar_mc.scaleX = (event.bytesLoaded/event.bytesTotal);
}

function completeListener(event:Event):void {
	loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressListener);
	loaderInfo.removeEventListener(Event.COMPLETE, completeListener);
	// do something
}</code></pre>
<p>This basically sets up two event listeners, progress and complete. While progress is happening, you get constant updates of bytesLoaded and bytesTotal, with which you can provide the user feedback that something is happening. In this case, it’s just changing the shape of a bar with the instance name “bar_mc” (note scaleX [AS3] rather than xScale [AS2]), but as I’m sure you’re well aware, you could use the result for a percentage indicator, or control an animation.</p>
<p>Note #1: It’s a good habit to remove event listeners when you no longer need them, hence the two lines of code within completeListener. These basically nuke both of these listeners that were in use while the SWF was loading because they aren’t needed once the movie has loaded.</p>
<p>Note #2: I’ve seen example code where “event” within the function is changed to “myEvent” or shortened to just “e”. It’s a variable that is self-contained and can be named anything you like, but it would be good to stick to a convention.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2008/05/19/flash-notes-preloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Notes: Setting Up An External ActionScript File</title>
		<link>http://www.webomatica.com/wordpress/2008/05/18/flash-notes-setting-up-an-external-actionscript-file/</link>
		<comments>http://www.webomatica.com/wordpress/2008/05/18/flash-notes-setting-up-an-external-actionscript-file/#comments</comments>
		<pubDate>Sun, 18 May 2008 19:36:54 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/?p=1832</guid>
		<description><![CDATA[Continuing on from the <a href="http://www.webomatica.com/wordpress/category/flash/">simple button example</a> you can set up an external ActionScript file that contains all your code.

This is setting up a "document class". You first create an ActionScript file and save it in the same directory as your Flash file; it will have the extension .as. Then go into your Flash file and in the Properties Inspector in the field "Document class", enter the name of your ActionScript file. Don't include the extension ".as". If you did this correctly, when you click on the pencil icon, your external ActionScript file will open.]]></description>
			<content:encoded><![CDATA[<p>Continuing on from the <a href="http://www.webomatica.com/wordpress/category/flash/">simple button example</a> you can set up an external ActionScript file that contains all your code.</p>
<p>This is setting up a “document class”. You first create an ActionScript file and save it in the same directory as your Flash file; it will have the extension .as. Then go into your Flash file and in the Properties Inspector in the field “Document class”, enter the name of your ActionScript file. Don’t include the extension “.as”. If you did this correctly, when you click on the pencil icon, your external ActionScript file will open.</p>
<p><img class="wgborder" width="400" height="200" src="http://www.webomatica.com/wordpress/images/blog/flash_document_class.jpg" alt="Flash: Document Class" /></p>
<p><strong>Note:</strong> If you have your AS file in subfolders, you can point to it using dot syntax relative to your .fla file. You can also set up Flash to look into particular folders as a system preference.</p>
<p>The external code contains the same code you’d have in the .fla file but enclosed in a “package”. Here’s the previous simple button example in a package:</p>
<pre>package {
import flash.display.MovieClip;
import flash.events.MouseEvent;
import flash.text.TextField;

public class button extends MovieClip{

	public function button() {
		myButton.buttonMode = true;
		myButton.mouseChildren = false;

		myButton.addEventListener(MouseEvent.MOUSE_UP, myButtonUp);
		myButton.addEventListener(MouseEvent.MOUSE_DOWN, myButtonDown);
		myButton.addEventListener(MouseEvent.MOUSE_OVER, myButtonOver);
		myButton.addEventListener(MouseEvent.MOUSE_OUT, myButtonOut);

		function myButtonUp(event:MouseEvent):void{
			events_txt.text = "Event: MOUSE_UP";
		}

		function myButtonDown(event:MouseEvent):void{
			events_txt.text = "Event: MOUSE_DOWN";
		}

		function myButtonOver(event:MouseEvent):void{
			events_txt.text = "Event: MOUSE_OVER";
		}

		function myButtonOut(event:MouseEvent):void{
			events_txt.text = "Event: MOUSE_OUT";
		}
	}
}
}</pre>
<p>The meat of the code is within the “button” function and is exactly the same as my previous post. It has to be the same name as the .as file. The “package” contains import statements that import various Flash libraries needed by the code. In this case, I had to import the libraries for MovieClip (my button is a movie clip), MouseEvent, (because I’m adding listeners for mouse events) and TextField (because I have a text field on the Stage). I really don’t know exactly what needs to be included for what purposes; I’m learning as I go.</p>
<p>Where this gets very powerful is setting up “class files” for library symbols, allowing them to be more portable across documents.</p>
<p>For more on this subject, check out <a href="http://www.adobe.com/devnet/flash/quickstart/external_files_as3/">this QuickStart at Adobe regarding external AS files</a>.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2008/05/18/flash-notes-setting-up-an-external-actionscript-file/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Notes: Properties, Button Event Listeners</title>
		<link>http://www.webomatica.com/wordpress/2008/05/10/flash-notes-properties-button-event-listeners/</link>
		<comments>http://www.webomatica.com/wordpress/2008/05/10/flash-notes-properties-button-event-listeners/#comments</comments>
		<pubDate>Sun, 11 May 2008 02:13:52 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/?p=1814</guid>
		<description><![CDATA[I'm finally getting around to learning ActionScript 3 and what better way to learn than forcing myself to upgrade an ActionScript 2 project and working on some other simple ones. Over several posts I'll document what I've discovered, mostly as a personal reference so I can refer to them later.]]></description>
			<content:encoded><![CDATA[<p>I’m finally getting around to learning ActionScript 3 and what better way to learn than forcing myself to upgrade an ActionScript 2 project and working on some other simple ones. Over several posts I’ll document what I’ve discovered, mostly as a personal reference so I can refer to them later.</p>
<p><strong>Properties</strong></p>
<p>Several properties in AS 2 have changed. The general rule is any that had an underscore, now doesn’t have one.</p>
<blockquote><pre><code>movieClip._x
movieClip._y
movieClip._height;
movieClip._width;
movieClip._alpha;
movieClip._visible;
movieClip._xscale;
movieClip._yscale;
_xmouse;
_ymouse;</code></pre>
</blockquote>
<p>are now all:</p>
<blockquote><pre><code>movieClip.x
movieClip.y
movieClip.height;
movieClip.width;
movieClip.alpha;
movieClip.visible;
movieClip.scaleX;
movieClip.scaleY;
mouseX;
mouseY;</code></pre>
</blockquote>
<p>Some properties that had a range of 1 to 100 now range from 0 to 1, most notably alpha and scale.</p>
<p><a href="http://actionscriptcheatsheet.com/blog/archives/22">Here’s an excellent cheat sheet</a> which covers changes from AS2 to AS3. </p>
<p><strong>Mouse Events and Event Listeners</strong></p>
<p>The next big change in AS3 are event listeners. A lot of situations handled in a variety of confusing ways are now handled in this manner. Some of these are loading items (goodbye loadMovie) and mouse interactivity. The most obvious place to introduce the event listener concept is with a button.</p>
<p>First, forget all the AS2 handlers (onRelease, onRollOver, etc). In AS3, you’ll add “event listeners” to button:</p>
<blockquote><pre><code>myButton.addEventListener(MouseEvent.MOUSE_UP, myButtonUp);</code></pre>
</blockquote>
<p>“myButton” is the instance name of the movie clip I want to target. “MouseEvent.MOUSE_UP” is the specific event the listener is listening for, and “myButtonUp” is the function that’s called when that event occurs.</p>
<p>Now you just define the “myButtonUp” function that will be triggered. Note that the event type is listed (MouseEvent) and “:void” indicating nothing is returned by this function.</p>
<blockquote><pre><code>function myButtonUp (event:MouseEvent):void{
	trace("Hello World");
}</code></pre>
</blockquote>
<p>There are similar mouse events for other common button behaviors:</p>
<blockquote><pre><code>myButton.addEventListener(MouseEvent.ROLL_OVER, myButtonOver);

function myButtonOver (event:MouseEvent):void{
	trace("Rolled over the button");
}

myButton.addEventListener(MouseEvent.ROLL_OUT, myButtonOut);

function myButtonOut (event:MouseEvent):void{
	trace("Rolled off of the button");
}</code></pre>
</blockquote>
<p>So here’s an example. There are four listeners and the button behaves as a button should. Oh boy.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="500" height="150" id="button" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="http://www.webomatica.com/widgets/button.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="http://www.webomatica.com/widgets/button.swf" quality="high" bgcolor="#000000" width="500" height="150" name="button" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /><br />
	</object></p>
<p><strong>Note #1:</strong> To get the hand cursor and up, over, and down states, I put the movie clip into “button mode” (myButton.buttonMode = true). Then the button can be set up with up, over, and down art using keyframes within that movie clip as in the image below:</p>
<p><img class="wgborder" width="293" height="88" src="http://www.webomatica.com/wordpress/images/blog/flash_timeline.jpg" alt="Flash timeline" title="Flash timeline" /></p>
<p><strong>Note #2:</strong> When designing more complex buttons, I noticed if there are other elements within the button movie clip, the listeners can register false. There are additional properties to limit the event behavior of movie clips within movie clips (“children”). So in the above example, I set the property “mouseChildren” of myButton to false (mybutton.mouseChildren = false). <a href="http://www.partlyhuman.com/blog/roger/hand-me-that-cursor-would-you">Read more about this subject at Partly Human</a>.</p>
<p>Anyhow, before this simple example gets too complicated, here’s a list of some common events:</p>
<blockquote><p>MouseEvent.CLICK –&gt; Mouse click<br />
MouseEvent.DOUBLE_CLICK –&gt; Mouse Double Click<br />
MouseEvent.MOUSE_MOVE –&gt; Mouse move<br />
MouseEvent.MOUSE_DOWN –&gt; Mouse button pressed<br />
MouseEvent.MOUSE_UP –&gt; Mouse button released<br />
MouseEvent.MOUSE_OVER –&gt; Cursor moves over something<br />
MouseEvent.MOUSE_OUT –&gt; Cursor moves off of something<br />
MouseEvent.MOUSE_WHEEL –&gt; Mouse wheel moves<br />
KeyboardEvent.KEY_DOWN –&gt; Key pressed<br />
KeyboardEvent.KEY_UP –&gt; Key released<br />
Event.ENTER_FRAME –&gt; Equivalent for “onEnterFrame“<br />
TimerEvent.TIMER –&gt; Happens every timer interval<br />
TimerEvent.TIMER_COMPLETE –&gt; Happens when timer object finishes</p></blockquote>
<p>The event listener model is the basis for many situations in ActionScript 3.0: keyboard events, preloaders, and image loading. So although this concept was at first annoying, it’s become increasingly handy.</p>
<p>More to come.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2008/05/10/flash-notes-properties-button-event-listeners/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Flash Notes: Using Tweener</title>
		<link>http://www.webomatica.com/wordpress/2008/03/21/flash-notes-using-tweener/</link>
		<comments>http://www.webomatica.com/wordpress/2008/03/21/flash-notes-using-tweener/#comments</comments>
		<pubDate>Fri, 21 Mar 2008 18:04:28 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2008/03/21/flash-notes-using-tweener/</guid>
		<description><![CDATA[Again, this post consists of notes for myself, but someone else out there might find them interesting.

I've used <a href="http://hosted.zeh.com.br/mctween/index.html">McTween</a> in Flash for quite some time now. It's a code extension to Flash that makes many animations extremely easy to implement. <a href="http://code.google.com/p/tweener/">A newer version called Tweener has been developed</a>, and it obviously took me until now to move over. But after playing with it for a day I can already see it making some things much easier. There are ActionScript 2.0 and ActionScript 3.0 versions of Tweener.]]></description>
			<content:encoded><![CDATA[<p>Again, this post consists of notes for myself, but someone else out there might find them interesting.</p>
<p>I’ve used <a href="http://hosted.zeh.com.br/mctween/index.html">McTween</a> in Flash for quite some time now. It’s a code extension to Flash that makes many animations extremely easy to implement. <a href="http://code.google.com/p/tweener/">A newer version called Tweener has been developed</a>, and it obviously took me until now to move over. But after playing with it for a day I can already see it making some things much easier. There are ActionScript 2.0 and ActionScript 3.0 versions of Tweener.</p>
<p><object width="500" height="200"><param name="movie" value="http://www.webomatica.com/widgets/tweener_example.swf" /><embed src="http://www.webomatica.com/widgets/tweener_example.swf" quality="high" bgcolor="#ffffff" width="500" height="200" /></object></p>
<p><strong>Installing Tweener</strong></p>
<p>Installing Tweener is different from McTween which was a Flash extension that installed with a double click. Tweener has to be added as a <em>class</em>. If you’ve never added a class to your installation of Flash, here’s how.</p>
<p>1. Download Tweener. It will appear as folder named “caurina”. This is standard practice as otherwise all the classes you install by different developers could have similar names and cause problems down the line.</p>
<p>2. Put the folder somewhere on your computer. It might be a good idea to create something like “Flash Development/Classes” in your My Documents folder, and put the “caurina” folder in it.</p>
<p>3. Start up Flash. Go to Edit -&gt; Preferences. In the menu on the left, click ActionScript. Then click on the Language: ActionScript 2.0 (or 3.0) Settings. In the dialog box that appears, you’ll be given an option to set up a “Classpath”. This is basically going to point to the directory you just put the “Caurina” folder into. Click the “+” to add a new path and then use the target button to browse to the directory that contains the “caurina” folder. Once this is set up, you won’t have to do this again, and any new classes you put into that folder will be accessible to your Flash files.</p>
<p>4. In your Flash file, include this ActionScript:</p>
<p><code>import caurina.transitions.Tweener;</code></p>
<p>There are other ways to add classes to ActionScript files but this is the manner most similar to that of McTween.</p>
<p><strong>Using Tweener</strong></p>
<p>The syntax for Tweener is different from McTween but more flexible once you get used to it. In McTween, you’d name the movie clip you wanted to animate and then the animation type with parameters:</p>
<p><code>button_mc.alphaTo(0, 2, "linear");</code></p>
<p>This would basically tell the movie clip with an instance name of button_mc to fade to zero over two seconds with a linear transition.</p>
<p>In Tweener, the syntax is flipped:</p>
<p><code>Tweener.addTween(button_mc, {_alpha:0, time:2, transition:"linear"});</code></p>
<p>The first big difference is the movie clip to be animated appears in the parameters. Second, the animation type doesn’t have to be named. McTween had a whole list of them: alphaTo, scaleTo, xScaleTo, volumeTo, rotateTo, etc. You just use “Tweener.addTween” any time you use Tweener. What ends up happening is a result of the parameters. If they’re different than what they were before, the animation occurs. The parameters can therefore be listed without having to know what to “call” the animation.</p>
<p>With McTween, if you wanted to fade out and change the scale simultaneously, you’d have to write:</p>
<p><code>button_mc.alphaTo(0,2,"linear");<br />
button_mc.scaleTo(0,2,"linear");</code></p>
<p>Wheras with Tweener you can just list another parameter:</p>
<p><code>Tweener.addTween(button_mc, {_alpha:0, _scale:0, time:2, transition:"linear"});</code></p>
<p>You don’t have to remember that the animation was specifically called “scaleTo” and “alphaTo” and you can just list everything in one tween and let Tweener figure it out.</p>
<p>Also note how the parameters are clearly idenitified, making it easier for other people looking at your code to figure out what’s going on. It should be very obvious which number to change to have animation take three seconds instead of two, while in the McTween version, not at all.</p>
<p><strong>Event updates</strong></p>
<p>With Tweener you can add function calls that fire at the start, end, and animation in progress.</p>
<p><code>Tweener.addTween(button_mc, {_alpha:0, scale:0, time:2, transition:"linear", onStart:this.starting, onUpdate:this.updating, onComplete:this.completing});</code></p>
<p>You can then write functions called button_mc.starting, button_mc.updating, and button_mc.completing containing whatever you want to happen at those moments. Before you would have to code your own test for the movie clip’s properties.</p>
<p><object width="500" height="200"><param name="movie" value="http://www.webomatica.com/widgets/tweener_test.swf" /><embed src="http://www.webomatica.com/widgets/tweener_test.swf" quality="high" bgcolor="#ffffff" width="500" height="200" /></object></p>
<p><strong>Base style</strong></p>
<p>Using a base style is similar to CSS (at least in my mind). You can set up a basic transition style at the top of your ActionScript, to be used in your code. Defining this base will make for easier editing later.</p>
<p><code>var fadingIn:Object = {alpha:100, _scale:1, time:0.5, transition:"linear"}</code></p>
<p>(later in your code)</p>
<p><code>Tweener.addTween(button_mc,{base:fadingIn,_color:0x000000});</code></p>
<p>The base scale is used in the button_mc animation, with the addition of the different color.</p>
<p>Anyhow, that’s my Tweener overview. Essentially, the results aren’t any cooler than McTween but the code behind is better and will be easier to read and edit in the future. That’s a good thing.</p>
<p>Here are some resources for further investigation into Tweener:</p>
<ul>
<li><a href="http://code.google.com/p/tweener/">Get Tweener</a></li>
<li><a href="http://hosted.zeh.com.br/tweener/docs/en-us/">Tweener Documentation</a></li>
<li><a href="http://labs.zeh.com.br/blog/">labs.zeh.com.br</a></li>
<li><a href="http://www.stimuli.com.br/trane/2007/nov/07/tweener-tips/">Stimuli: Tweener Tips</a></li>
<li><a href="http://labs.zeh.com.br/blog/?p=120">Tweener Transitions</a></li>
<li><a href="http://labs.zeh.com.br/blog/?p=104">Bezier Curves in Tweener</a></li>
</ul>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2008/03/21/flash-notes-using-tweener/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Tip: ComboBox Component Breaks Buttons</title>
		<link>http://www.webomatica.com/wordpress/2008/03/06/flash-tip-combobox-component-breaks-buttons/</link>
		<comments>http://www.webomatica.com/wordpress/2008/03/06/flash-tip-combobox-component-breaks-buttons/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 03:54:47 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2008/03/06/flash-tip-combobox-component-breaks-buttons/</guid>
		<description><![CDATA[I'm posting this Flash problem more for my own future reference, but perhaps someone else will benefit.

Basically I'm generally wary of using the built-in Flash components, for whenever I get one working, I develop some bugs that have me wondering if I should have created something from scratch. My experience with the "ComboBox" component was no different.]]></description>
			<content:encoded><![CDATA[<p>I’m posting this Flash problem more for my own future reference, but perhaps someone else will benefit.</p>
<p>Basically I’m generally wary of using the built-in Flash components, for whenever I get one working, I develop some bugs that have me wondering if I should have created something from scratch. My experience with the “ComboBox” component was no different.</p>
<p>The “ComboBox” is a drop down menu that you can fill with your own list. The user can pick an option and you get the data out.</p>
<p>After I got it working I realized it was breaking some buttons I had already created, but in a fairly subtle way. Say you have a button that the user can click on repeatedly, as in a number increment or in my case, a “next” button for an image gallery. The way it should work is the user can click on the button a ton of times in sequence without having to move the mouse.</p>
<p>But when combobox is activated, this behavior breaks. Meaning, in the example below, the button works as described above — until the user clicks on the ComboBox. Then the arrow buttons don’t work quite right. You have to move the mouse a little in order to reactive the button once you click on it.</p>
<p><embed src="http://www.webomatica.com/widgets/combobox_problem.swf" quality="high" bgcolor="#ffffff" width="400" height="200" name="combobox_problem" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></p>
<p>Because the behavior changes after touching the ComboBox, I was pretty sure the component was the culprit. After doing some searching online, I found <a href="http://www.jetfly.no/flashcase/comboproblem/index.html">this fix at Jetfly</a> (which in turn points to <a href="http://www.philterdesign.com/blog/archives/000031.html">this fix at PhilterBlog</a> ) where I learned of a “focus management” that the ComboBox takes a hold of, and is what causes the other buttons to change their behavior. You can return the focus to the buttons using something like:</p>
<blockquote><p>next_btn.onPress = function(){<br />
    Selection.setFocus(this);<br />
};</p></blockquote>
<p>Great, this solves the button bug… but then Flash draws a yellow box around the buttons, for “keyboard focus”.</p>
<p><embed src="http://www.webomatica.com/widgets/combobox_problem_half_fix.swf" quality="high" bgcolor="#ffffff" width="400" height="200" name="combobox_problem_half_fix" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></p>
<p>More searching revealed a property I never heard of called “<a href="http://livedocs.adobe.com/flashlite/2/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&#038;file=00000219.html">_focusrect</a>”, that you can use to turn off the yellow box:</p>
<blockquote><p>next_btn.onPress = function(){<br />
    this._focusrect = false;<br />
    Selection.setFocus(this);<br />
};</p></blockquote>
<p><embed src="http://www.webomatica.com/widgets/combobox_problem_fix.swf" quality="high" bgcolor="#ffffff" width="400" height="200" name="combobox_problem_fix" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></p>
<p>Unwanted behavior eliminated, and I learned stuff: 1) setFocus and focusrect, 2) reaffirmed my general annoyance with Flash components, and 3) as with most of my Flash problems, someone else has already encountered them and posted fixes online.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2008/03/06/flash-tip-combobox-component-breaks-buttons/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Flash Tip 1: Preloader Doesn’t Work? It Might Be Your Sounds</title>
		<link>http://www.webomatica.com/wordpress/2007/09/15/flash-tip-1-preloader-doesnt-work-it-might-be-your-sounds/</link>
		<comments>http://www.webomatica.com/wordpress/2007/09/15/flash-tip-1-preloader-doesnt-work-it-might-be-your-sounds/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 21:19:02 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2007/09/15/flash-tip-1-preloader-doesnt-work-it-might-be-your-sounds/</guid>
		<description><![CDATA[I made a goofy Gilmore Girls video game and then realized I messed something up that causes the preloader to not display right away - defeating the whole purpose of a preloader.

When dynamically loading and playing sounds in ActionScript, you may have correctly set your sound file in the library to Export for ActionScript and Export in first frame. It's the latter item that messes things up. It seems Flash takes that first frame thing literally and will load those library items even before the ActionScript you have on frame one, layer one - which is usually your preloader code.]]></description>
			<content:encoded><![CDATA[<p>I made a goofy Gilmore Girls video game and then realized I messed something up that causes the preloader to not display right away — defeating the whole purpose of a preloader.</p>
<p><em>Note: This is all in the ActionScript 2.0 world — I’m still getting up to speed in ActionScript 3.0… </em></p>
<p>When dynamically loading and playing sounds in ActionScript, you may have correctly set your sound file in the library to Export for ActionScript and Export in first frame. It’s the latter item that messes things up. It seems Flash takes that first frame thing literally and will load those library items even before the ActionScript you have on frame one, layer one — which is usually your preloader code.</p>
<p>One way around this is to force Flash to load the sound files after the first frame but before the frame they’re needed. Here are the steps to do so:</p>
<ol>
<li>Decide on a frame to load your sounds into that’s after frame 1 but before the main body of your movie — the obvious choice is frame 2.</li>
<li>Change your preloader code that’s on frame 1 to skip frame 2 and go to the actual body of your movie after everything has loaded.</li>
<li>Select your sound files one by one in the library and uncheck “Export in first frame”.</li>
<li>Select frame 2. Insert a blank movie clip on the Stage (Insert -&gt; New Symbol)</li>
<li>Open up that blank movie clip. On frame one, add a stop(); action.</li>
<li>Create a keyframe on frame 2 of this blank movie clip. In the Properties Inspector, set the sound drop down menu to one of the sounds in your library that you need to load early.</li>
<li>Repeat steps 4 through 7 for all your sounds in the library.</li>
</ol>
<p>Essentially the deal here is you’re putting all your sounds into “dummy” movie clips hanging out on frame 2. But because of the ActionScript edits in the preloader and the stop(); in the dummy movie clips, your movie will never play those sounds — but it will load them.</p>
<p>Now test your movie — especially with the download manager at some ridiculously low bandwidth settings — and your preloader should function as it should.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2007/09/15/flash-tip-1-preloader-doesnt-work-it-might-be-your-sounds/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Some Web Design Basics 1: XHTML</title>
		<link>http://www.webomatica.com/wordpress/2007/09/15/some-web-design-basics-1-xhtml/</link>
		<comments>http://www.webomatica.com/wordpress/2007/09/15/some-web-design-basics-1-xhtml/#comments</comments>
		<pubDate>Sat, 15 Sep 2007 10:30:59 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2007/09/15/some-web-design-basics-1-xhtml/</guid>
		<description><![CDATA[In the interest of sharing information, this is the first in a series of "brain dump" posts regarding web design - specifically for folks who are starting a blog.]]></description>
			<content:encoded><![CDATA[<p>In the interest of sharing information, this is the first in a series of “brain dump” posts regarding web design — specifically for folks who are starting a blog.</p>
<p>Much of what I’ve learned post-college has been from <a href="http://www.zeldman.com/">Jeffrey Zeldman</a>, or the other site <a href="http://www.alistapart.com/">A List Apart</a>. The basic idea behind their vision of “<a href="http://www.webstandards.org/about/mission/">web standards</a>” is to code with XHTML and CSS. A lot of really sloppy code was forgiven by the browsers of old, leading to pages that looked fine but were a pain to update (images cut into slices and laid out in tables comes to mind). Web politics aside, web standards are a good goal to strive for as they allow for the <a href="http://www.csszengarden.com/">separation of content and design</a>. The order also makes your code easier to read, understand, and parseable.</p>
<p>This might sound intimidating but I’ll break it into steps. I’ll start off with XHTML and how to code it. XHTML stands for EXtensible Markup Language and is a combination of XML and HTML. It’s pretty easy.  Check out this article at <a href="http://www.alistapart.com/articles/xhtml/">A List Apart for the basics</a>.</p>
<p>The basic rules are:</p>
<ul>
<li>XHTML elements must be properly nested</li>
<li>XHTML elements must always be closed</li>
<li>XHTML elements must be in lowercase</li>
<li>XHTML elements must have one root element</li>
</ul>
<p>And what this really means:</p>
<ul>
<li>All tags are lowercase — write &lt;div&gt; rather than &lt;DIV&gt;.</li>
<li>All tags must be closed. If you have a &lt;p&gt;text you must have a corresponding &lt;/p&gt; on the other end.</li>
<li>Tags that don’t have a corresponding closing tag are closed within the tag: &lt;br /&gt;, &lt;img /&gt;, &lt;hr /&gt;.</li>
<li>Tags must be nested correctly: &lt;p&gt;&lt;em&gt;text&lt;/em&gt;&lt;/p&gt; rather than &lt;p&gt;&lt;em&gt;text&lt;/p&gt;&lt;/em&gt;.</li>
<li>The root element bit means each page has a basic structure of: &lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;/body&gt;&lt;/html&gt;</li>
</ul>
<p>Some additional rules:</p>
<ul>
<li>All tag attributes must have quotes: &lt;img width=“100” height=“100” /&gt;</li>
<li>I’m not sure if this is required, but &lt;b&gt; and &lt;i&gt; are ideally replaced with &lt;strong&gt; and &lt;em&gt;.</li>
<li>Now to make it clear that your document is <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html">XHTML the proper DOCTYPE is declared in the header</a>. In general, I’ve been told to use XHTML 1.0 Transitional.</li>
</ul>
<p>Once you have an XHTML document, it’s a great idea to <a href="http://validator.w3.org/">run it through a validator over at W3C</a>. Just enter the URL of your XHTML document and all the mistakes will be reported. That’s pretty much it. Really.</p>
<p>So how does all this apply to blogging? Well, WordPress right out of the box generates pages in XHTML. But here are some reasons why any blogger should know about XHTML:</p>
<ul>
<li>If you want to edit your blog’s theme or want to create your own.</li>
<li>There is a “code view” available when writing posts in WordPress.</li>
<li>A blog that doesn’t validate <a href="http://www.webpronews.com/insiderreports/2004/09/23/does-wc-validation-help-in-search-rankings">may have trouble being recognized by spiders that index your site for search engines</a>.</li>
</ul>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2007/09/15/some-web-design-basics-1-xhtml/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Bad Video Game #1: Gilmore Girls Series Finale</title>
		<link>http://www.webomatica.com/wordpress/2007/09/12/bad-video-game-1-gilmore-girls-series-finale/</link>
		<comments>http://www.webomatica.com/wordpress/2007/09/12/bad-video-game-1-gilmore-girls-series-finale/#comments</comments>
		<pubDate>Thu, 13 Sep 2007 04:03:35 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Contests]]></category>
		<category><![CDATA[Gilmore Girls News]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2007/09/12/bad-video-game-1-gilmore-girls-series-finale/</guid>
		<description><![CDATA[Ever since the <a href="http://www.webomatica.com/wordpress/2007/05/16/gilmore-girls-bon-voyage/">Series Finale of <em>Gilmore Girls</em></a> I have been thinking to myself how lame it was that Luke never got a chance to propose to Lorelai (again). So I made this video game that <a href="http://www.webomatica.com/wordpress/2007/04/18/gilmore-girls-season-8-but-shorter/">recaptures the frustration</a>.]]></description>
			<content:encoded><![CDATA[<p>Ever since the <a href="http://www.webomatica.com/wordpress/2007/05/16/gilmore-girls-bon-voyage/">Series Finale of <em>Gilmore Girls</em></a> I have been thinking to myself how lame it was that Luke never got a chance to propose to Lorelai (again). So I made this video game that <a href="http://www.webomatica.com/wordpress/2007/04/18/gilmore-girls-season-8-but-shorter/">recaptures the frustration</a>.</p>
<p>Do you have any terrible ideas of your own? Enter the <a href="http://www.webomatica.com/wordpress/2007/09/12/third-webomatica-contest-bad-video-game-ideas/">Webomatica Contest: Bad Video Game Ideas</a>. </p>
<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="400" height="300"><param name="movie" value="http://www.webomatica.com/widgets/gilmore_girls.swf" /><param name="quality" value="high" /><embed src="http://www.webomatica.com/widgets/gilmore_girls.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="400" height="300"></embed></object></p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2007/09/12/bad-video-game-1-gilmore-girls-series-finale/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Third Webomatica Contest: Bad Video Game Ideas</title>
		<link>http://www.webomatica.com/wordpress/2007/09/12/third-webomatica-contest-bad-video-game-ideas/</link>
		<comments>http://www.webomatica.com/wordpress/2007/09/12/third-webomatica-contest-bad-video-game-ideas/#comments</comments>
		<pubDate>Wed, 12 Sep 2007 13:10:10 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Contests]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2007/09/12/third-webomatica-contest-bad-video-game-ideas/</guid>
		<description><![CDATA[The third Webomatica contest should be fun for all involved. I'm looking for <strong>bad video game ideas</strong>.]]></description>
			<content:encoded><![CDATA[<p><img title="Cheetahmen" src="http://www.webomatica.com/wordpress/images/blog/bvg.jpg" alt="Cheetahmen" width="300" height="240" /></p>
<p>The third Webomatica contest should be fun for all involved. I’m looking for <strong>bad video game ideas</strong>.</p>
<ol>
<li>Brainstorm an idea for a terrible video game. Some ideas, which should be pretty self-explanatory:
<ol>
<li>Peak Oil</li>
<li>Help Casey Serin Avoid Foreclosure</li>
<li>Greedo: Who Shot First?</li>
<li>Sausage Construction Set</li>
</ol>
</li>
<li>For more brainstorming fodder, <a href="http://www.psychochild.org/?p=325">here’s a link to some awful video game ideas</a>. Also check out some actual, terrible video games like <a href="http://www.nesguide.com/games/cheetamen2/">Cheetamen</a> (<a href="http://cheetahmen.silius.net/">here’s a history site</a>), <a href="http://en.wikipedia.org/wiki/Action_52">Action 52</a>, <a href="http://uk.youtube.com/watch?v=r-pzdPLfy9Y&amp;mode=related&amp;search=">ET</a>, this <a href="http://en.wikipedia.org/wiki/Takeshi_no_Chousenjou">Japanese “ultimate challenge” game</a>, <a href="http://en.wikipedia.org/wiki/Penn_&amp;_Teller's_Smoke_and_Mirrors">Penn and Teller video game</a> (<a href="http://www.gamesetwatch.com/2006/03/penn_jillette_discusses_unrele.php">read more here</a>). <a href="http://en.wikipedia.org/wiki/Video_games_notable_for_negative_reception">Read this list of video games that got a bad reception</a>.</li>
<li>(A video game based on one of <a href="http://www.webomatica.com/wordpress/2007/07/27/second-webomatica-contest-bad-good-movies/">the truly terrible movies you folks had me watch</a> is possible, but a bit obvious).</li>
<li>“Bad” could mean “stupid” “cynical” “impossible” “gross” or “frustrating” it’s really up to you.</li>
<li>The best idea or two will be made into a small Flash video game by yours truly. That should be enough of a prize for anyone, I think — but on second thought I’ll throw in a <strong>$20 iTunes gift certificate</strong>. I’ll work with the idea person(s) directly, during development.</li>
<li>I have two playable examples coming up shortly — I think you’ll get the idea after those go live.</li>
</ol>
<p>(Yes, there is a slight ulterior motive for this contest — I need to improve my Flash skills and small, self-contained projects are the easiest way to get my feet wet).</p>
<p>Please post any entries to the contest in the comments below, or write about it on your own blog and link here.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2007/09/12/third-webomatica-contest-bad-video-game-ideas/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Annoying IE Bug: Creeping Text</title>
		<link>http://www.webomatica.com/wordpress/2007/08/30/annoying-ie-bug-creeping-text/</link>
		<comments>http://www.webomatica.com/wordpress/2007/08/30/annoying-ie-bug-creeping-text/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 01:28:44 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2007/08/30/annoying-ie-bug-creeping-text/</guid>
		<description><![CDATA[But in regards to Internet Explorer and "creeping text": The site looks dandy in Firefox and Safari, but I always hold my breath when it comes to Internet Explorer on a PC. So I checked out few pages and noticed this annoying problem in the comments - basically everything was slowly edging to the left, to the point where the text was appearing off the side of the page.]]></description>
			<content:encoded><![CDATA[<p>Every few months I get bored of how this site looks, hence the theme overhaul. The color scheme is slightly different, the fonts have been changed, and some different art is still to come.</p>
<p>I removed a few things from the sidebar and two images (a page background and a footer) that I really can’t remember why I ever had them in the theme — I guess that’s what comes from hacking a pre-made theme. <a href="http://skelliewag.org/50-tips-to-unclutter-your-blog-44.htm">Skelliewag.org has a really great post on de-cluttering your blog</a> that is inspiring some of my pruning.</p>
<p>But in regards to Internet Explorer and “creeping text”: The site looks dandy in Firefox and Safari, but I always hold my breath when it comes to Internet Explorer on a PC. So I checked out few pages and noticed this annoying problem in the comments — basically everything was slowly edging to the left, to the point where the text was appearing off the side of the page:</p>
<p><img title="Creeping Text Internet Explorer" src="http://www.webomatica.com/wordpress/images/blog/creepingtext.jpg" alt="Creeping Text Internet Explorer" width="383" height="388" /></p>
<p><a href="http://www.positioniseverything.net/explorer/creep.html">Turns out this is an IE-specific “creeping text” CSS bug</a> (view the link in IE to see for yourself). It happens when block elements are nested within one another, and the elements have only a left border and a bottom padding. Turns out that’s exactly what I was doing in the comments to create the green stripe. While updating the theme, I removed the bottom borders from both the comment &lt;li&gt; and the page &lt;div&gt;, hence the zombie-fied text.<br />
So I added a grey bottom border to the comment &lt;li&gt; and no more creep.</p>
<p>Did I mention I hate Internet Explorer? But according to my server logs a vast majority of people who happen across this blog use it, so I must cater to them somewhat. As a result, I do appreciate that whenever I have a strange web design problem, odds are someone on the Internet has posted a fix. And so I do the same through this post.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2007/08/30/annoying-ie-bug-creeping-text/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Screwing Around With Widgets</title>
		<link>http://www.webomatica.com/wordpress/2007/08/15/screwing-around-with-widgets/</link>
		<comments>http://www.webomatica.com/wordpress/2007/08/15/screwing-around-with-widgets/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 19:32:40 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Blogs]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2007/08/15/screwing-around-with-widgets/</guid>
		<description><![CDATA[I noticed Apple had a <a href="http://www.apple.com/itunes/">pretty amusing UI thing going on in their sidebars on the iTunes web pages</a>, so I made a Flash widget that mimics the sliding  tabs effect.]]></description>
			<content:encoded><![CDATA[<p>I noticed Apple had a <a href="http://www.apple.com/itunes/">pretty amusing UI thing going on in their sidebars on the iTunes web pages</a>, so I made a Flash widget that mimics the “sliding tabs” effect.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="200" height="300" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="bgcolor" value="#ffffff" /><param name="align" value="middle" /><param name="src" value="http://www.webomatica.com/widgets/ticker.swf" /><param name="quality" value="high" /><embed type="application/x-shockwave-flash" width="200" height="300" src="http://www.webomatica.com/widgets/ticker.swf" quality="high" align="middle" bgcolor="#ffffff"></embed></object></p>
<p>I haven’t decided if I’ll add it to the blog sidebar as I’m still a bit anti anything that slows the page loading down. But still, I ought to do more of this experimentation in the future — it’s pretty fun.</p>
<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2007/08/15/screwing-around-with-widgets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Joomla Module Success</title>
		<link>http://www.webomatica.com/wordpress/2006/06/19/joomla-module-success/</link>
		<comments>http://www.webomatica.com/wordpress/2006/06/19/joomla-module-success/#comments</comments>
		<pubDate>Mon, 19 Jun 2006 07:10:30 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2006/06/19/joomla-module-success/</guid>
		<description><![CDATA[I finally got my first Joomla module working. After getting stuck on the install process, I gave up using the zip file technique. Joomla lets you install from a directory, so I just uploaded my files and using that method, everything installed properly. Go figure.
]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p>I finally got my first Joomla module working. After getting stuck on the install process, I gave up using the zip file technique. Joomla lets you install from a directory, so I just uploaded my files and using that method, everything installed properly. Go figure.</p>
<p>Finally able to test the module, the MySql result didn’t display at all. So I opened up another module I’d been using (Hit Counter) and found a few lines to tweak, namely those responsible for converting the query result into a format suitable for ouput by pHp. Success. The total number of bottle caps… 457. Oops, off by 2.</p>
<p>This slightly off result was likely due to old bottle caps that I deleted or unpublished from the system. After a bit of poking around with pHpMyAdmin, it seems a published content item has a value of 1 in its state column. So I updated my query to count content items matching two categories:</p>
<p>SELECT COUNT(*) FROM jos_content WHERE sectionid = ‘4’ AND state = ‘1’</p>
<p>The result: 495, the exact number of bottle caps currently displaying on the site. Now every time I add a new bottle cap, I’ll get a minute of my life back.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2006/06/19/joomla-module-success/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My First Joomla Module</title>
		<link>http://www.webomatica.com/wordpress/2006/06/17/my-first-joomla-module/</link>
		<comments>http://www.webomatica.com/wordpress/2006/06/17/my-first-joomla-module/#comments</comments>
		<pubDate>Sat, 17 Jun 2006 17:12:38 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2006/06/17/my-first-joomla-module/</guid>
		<description><![CDATA[This isn't really a how to, maybe a document of my own confusion. Anyhow, my current project is to add a simple sidebar module to <a href="http://www.bottlecaporama.com">Bottle Cap-O-Rama</a> that displays a current count of all the bottle caps. Sounds like an easy task, however the site runs on Joomla and the ideal way to do this involves several layers of technology.]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p>This isn’t really a how to, maybe a document of my own confusion. Anyhow, my current project is to add a simple sidebar module to <a href="http://www.bottlecaporama.com">Bottle Cap-O-Rama</a> that displays a current count of all the bottle caps. Sounds like an easy task, however the site runs on Joomla and the ideal way to do this involves several layers of technology.</p>
<p>The first is MySql which I want to learn more about, but essentially it’s a database running on the server. My technical knowledge of MySql has been limited due to my use of content management systems (WordPress, Joomla) which create a nice friendly front end via pHp. This is not always a good thing.</p>
<p>The other night as I was updating this very WordPress blog I was greeted with a truly ugly error about headers already being sent, leaving me unable to update half the site. Luckily there was support through the <a href="http://www.wordpress.org">WordPress site</a> that directed me to <a href="http://www.tamba2.org.uk/wordpress/repair/">this page</a>. A simple table repair fixed my problem — and reminded me that I really need to get more familiar with MySql and pHp.</p>
<p>I decided the writing of a “bottle cap total” module for Joomla would be one way to accomplish this. After poking around on the server and consulting the <a href="http://dev.mysql.com/doc/refman/5.0/en/counting-rows.html">MySql reference guide</a>, I wrote my first MySql query:</p>
<p>SELECT COUNT(*) FROM jos_content WHERE sectionid = ‘4’;</p>
<p>…which pulls up the total number of bottle caps in the datbase. Success! But the job isn’t done, as this query needs to be called through Joomla.</p>
<p>So this is where I got stuck. There’s a <a href="http://help.joomla.org/content/view/775/125/">helpful tutorial</a> online for writing simple Joomla modules. I was able to get “Hello World” working easily enough, but when replacing the query in the tutorial with my own, something got muddled. Unfortunately I think it’s something awry with the installation. Joomla prefers that modules are installed via an uploaded zip file. The package contents seem to be described by an XML file. Each time I uploaded my module, it would say a file was missing that was most certainly there. So I’m stuck at this point, not able to test my module because I can’t get it installed. And I’m unclear how to install a module with manual FTP.</p>
<p>I’m at the point where I’ve made progress but have nothing tangible to show for it, which is frustrating. And although I still think Joomla and WordPress are awesome, there’s definitely a level of trust I’ve handed over, plus a learning curve if you really want to customize either system. The information is out there; just a bit opaque at times when you get the strange error messages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2006/06/17/my-first-joomla-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress Clean Up</title>
		<link>http://www.webomatica.com/wordpress/2006/06/14/wordpress-clean-up/</link>
		<comments>http://www.webomatica.com/wordpress/2006/06/14/wordpress-clean-up/#comments</comments>
		<pubDate>Thu, 15 Jun 2006 01:01:29 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.webomatica.com/wordpress/2006/06/14/wordpress-clean-up/</guid>
		<description><![CDATA[Spent most of the day hacking away at clean-up on Webomatica, mostly due to the frustrations of seeing Google not index the site properly. I chalk it up to the fact that I moved a bunch of content from static HTML pages to dynamically driven WordPress ones, and not really understanding the nature of "SEF" (search engine friendly) links.

Spent most of the day hacking away at clean-up on Webomatica, mostly due to the frustrations of seeing Google not index the site properly. I chalk it up to the fact that I moved a bunch of content from static HTML pages to dynamically driven WordPress ones, and not really understanding the nature of "SEF" (search engine friendly) links.]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p>Spent most of the day hacking away at clean-up on Webomatica, mostly due to the frustrations of seeing Google not index the site properly. I chalk it up to the fact that I moved a bunch of content from static HTML pages to dynamically driven WordPress ones, and not really understanding the nature of “SEF” (search engine friendly) links.</p>
<p>Basically, to make a long story short, when I first threw this blog up, all the links were of the “id?=3″ nature, and Google indexed them. Then I switched to SEF links where the title of the post is in the name, and the Google robots seemed understandably confused by this.</p>
<p>To top it off, during my clean-up, I found that the photo gallery pages were never updated to reflect the new structure, so they were still pointing to the numerical format and not the SEF versions. However, <em>they still worked</em>, so I never caught them when checking for broken links.</p>
<p>Another more complex issue is the idea that Google doesn’t like to index pages with duplicate content, and in WordPress there is in fact duplicate content if you consider the actual post pages and the archive pages. I’ve tried to fix this problem with different meta tags both in content and in telling the robots which pages to index.</p>
<p>Needless to say, I think I have the more or less solved, and only time will tell.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2006/06/14/wordpress-clean-up/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Diving In With Joomla</title>
		<link>http://www.webomatica.com/wordpress/2006/01/29/diving-in/</link>
		<comments>http://www.webomatica.com/wordpress/2006/01/29/diving-in/#comments</comments>
		<pubDate>Sun, 29 Jan 2006 17:28:13 +0000</pubDate>
		<dc:creator>Jason Kaneshiro</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://webomatica.com/wordpress/29/diving-in.htm</guid>
		<description><![CDATA[Starting to muck about with Joomla, an open source CMS that I'm planning to use for my bottle cap collection, which is getting far too large for me to handle in the old, manual way. So far I've noticed the basic concept is similar to WordPress as there's CSS templates wrapping around information stored in a database, and it also uses PHP. But Joomla seems to have much more robust admin tools, modules, and graphic support to make all the parts of a web page look prettier.]]></description>
			<content:encoded><![CDATA[<p>
<!-- Begin Google Adsense code -->
<script type="text/javascript"><!--
google_ad_client = "pub-8077100614383453";
/* 468x60, created 4/23/08 */
google_ad_slot = "7152567491";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
<!-- End Google Adsense code -->
</p>
<p>Starting to muck about with Joomla, an open source CMS that I’m planning to use for my bottle cap collection, which is getting far too large for me to handle in the old, manual way. So far I’ve noticed the basic concept is similar to WordPress as there are CSS templates wrapping around information stored in a database, and it also uses PHP. But Joomla seems to have much more robust admin tools, modules, and graphic support to make all the parts of a web page look prettier.</p>
<p>Having come to this set up from the coding by hand days, I must say it’s a bit scary to be so removed from the design of the content. The only analogy I can think of is cooking. There are times you want to make everything from scratch, others when you want to eat out and have someone else do everything, but most often we’re somewhere in the middle, following a recipe and using a couple of ingredients that have 90% of the work done.</p>
<p>So at this point, after a few hours of mucking around I’ve got something together that’s a <a href="http://www.bottlecaporama.com">great framework</a>. I’ll be adding more items little by little. My uber-goal is to generate a grid of sorts with thumbnails for as many bottle caps as I can cram onto one page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webomatica.com/wordpress/2006/01/29/diving-in/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

