<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>AO-Blog</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/" />
    <link rel="self" type="application/atom+xml" href="http://alwaysfinetuning.com/ao-blog/atom.xml" />
    <id>tag:alwaysfinetuning.com,2007-12-13:/ao-blog//1</id>
    <updated>2011-10-05T09:03:27Z</updated>
    
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Publishing Platform 4.01</generator>

<entry>
    <title>[AS3] テキスト入力で日本語が入力できない</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2011/10/as3-2.html" />
    <id>tag:alwaysfinetuning.com,2011:/ao-blog//1.164</id>

    <published>2011-10-05T07:03:40Z</published>
    <updated>2011-10-05T09:03:27Z</updated>

    <summary>ダイナミックテキスト(スクリプトで生成した)のテキスト入力が一部のブラウザで日本...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="actionscript3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>ダイナミックテキスト(スクリプトで生成した)のテキスト入力が一部のブラウザで日本語入力ができなかったり、<br />文字入力が全くできない現象に遭遇。<br /></p>
<p>まずMac OSのSafariの場合Flash PLayerがdebuggerだと起こるみたいなので<br />通常のFlashPlayerに変更したら解決。</p>

<p>あと、Windows XP ,7のChromeの場合は<br />swfを埋め込むさいの設定でwmodeをtransparentもしくは未設定だと起こるらしく、<br />wmodeをwindowに設定で解決。<br /></p><p>方法：<br /><a href="http://cocoasaurus.com/blog/2009/10/as3textfiled.html">http://cocoasaurus.com/blog/2009/10/as3textfiled.html</a><br /></p>
<p>それでもなおらない場合はChrome独自のFLashPlayerが原因と考えられるので、<br />Chromeの設定から独自のFlashPlayerを無効のすると解決するかも。<br /></p>

<p>方法：<br />
<a href="http://cocoasaurus.com/blog/2009/10/as3textfiled.html">http://getnews.jp/archives/97367</a>

</p>
]]>
        
    </content>
</entry>

<entry>
    <title>DJ Food on Green Man Radio</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2011/01/dj-food-on-green-man-radio.html" />
    <id>tag:alwaysfinetuning.com,2011:/ao-blog//1.158</id>

    <published>2011-01-17T10:52:07Z</published>
    <updated>2011-01-17T10:52:46Z</updated>

    <summary> Dj Food On Green Man Radio by Green Man...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="Music" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[ <div><object height="300" width="300"><param name="movie" value="http://www.mixcloud.com/media/swf/player/mixcloudLoader.swf?v=101" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashVars" value="feed=http://www.mixcloud.com/api/1/cloudcast/greenman/dj-food-on-green-man-radio.json&amp;embed_uuid=e08ad773-cb68-4974-b2cb-fd67a4814909&amp;embed_type=widget_standard" /><embed src="http://www.mixcloud.com/media/swf/player/mixcloudLoader.swf?v=101" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" flashvars="feed=http://www.mixcloud.com/api/1/cloudcast/greenman/dj-food-on-green-man-radio.json&amp;embed_uuid=e08ad773-cb68-4974-b2cb-fd67a4814909&amp;embed_type=widget_standard" height="300" width="300"></object><div style="clear: both; height: 3px;"></div><p style="display: block; font-size: 12px; font-family: Helvetica,Arial,sans-serif; margin: 0pt; padding: 3px 4px; color: rgb(153, 153, 153);"><a href="http://www.mixcloud.com/greenman/dj-food-on-green-man-radio/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=cloudcast_link" style="color: rgb(2, 160, 199); font-weight: bold;">Dj Food On Green Man Radio</a> by <a href="http://www.mixcloud.com/greenman/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=profile_link" style="color: rgb(2, 160, 199); font-weight: bold;">Green Man Radio</a> on <a href="http://www.mixcloud.com/?utm_source=widget&amp;utm_medium=web&amp;utm_campaign=base_links&amp;utm_term=homepage_link" style="color: rgb(2, 160, 199); font-weight: bold;"> Mixcloud</a></p><div style="clear: both; height: 3px;"></div></div>]]>
        
    </content>
</entry>

<entry>
    <title>NICK VEASEY</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/12/nick-veasey.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.156</id>

    <published>2010-12-20T23:03:30Z</published>
    <updated>2010-12-20T23:11:22Z</updated>

    <summary>X線カメラで作品を撮る写真家さん   Official Site http://...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="Art" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>X線カメラで作品を撮る写真家さん<br /></p>

<p><img alt="NICK VEASEY" src="http://alwaysfinetuning.com/ao-blog/nick_v.png" height="90%" width="90%" /></p>

 <p><img alt="NICK VEASEY" src="http://alwaysfinetuning.com/ao-blog/nick_v2.png" height="90%" width="90%" /></p>

<p>Official Site<br />
<a href="http://www.nickveasey.com/">http://www.nickveasey.com/</a></p>]]>
        
    </content>
</entry>

<entry>
    <title>[JS] IEでのsetAttributeの挙動。</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/07/js-iesetattribute-1.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.148</id>

    <published>2010-07-28T09:42:37Z</published>
    <updated>2010-07-28T09:58:51Z</updated>

    <summary>最近、案件で慣れないjavascriptをゴニョゴニョしていたらIEでsetAt...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="javascript" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>最近、案件で慣れないjavascriptをゴニョゴニョしていたらIEで<code>setAttribute</code>が効かなかった。<br />調べてみたら、いつものIEのバグだったという。</p><p>下記のように属性値を設定しようとする場合右のように小文字と大文字を組み合わせて書いたら動いた。<br /></p><pre><code>element.setAttribute("bgcolor","#ffffff");&nbsp;→&nbsp;element.setAttribute("bgColor","#ffffff");<br /><br />bgcolorとか今だに使ってるの？という苦情は一切受け付けません。<br /><br /></code></pre> ]]>
        
    </content>
</entry>

<entry>
    <title>[CSS] liタグでフロートさせると下にマージンが空いてしまう</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/07/css.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.146</id>

    <published>2010-07-04T10:03:01Z</published>
    <updated>2010-07-04T10:32:55Z</updated>

    <summary>久しぶりにCSSやったら初歩的な部分ではまった。 こんな感じでグローバルナビゲー...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="CSS" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>久しぶりにCSSやったら初歩的な部分ではまった。<br /></p>
<p>こんな感じでグローバルナビゲーションをマークアップすると思うのですが</p>
<pre name="code" class="html">&lt;div id="globalNavi"&gt;
&lt;ul&gt;
&lt;li&gt;画像&lt;/li&gt;
&lt;li&gt;画像&lt;/li&gt;
&lt;li&gt;画像&lt;/li&gt;
&lt;li&gt;画像&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div id="contentArea"&gt;
&lt;/div&gt;</pre>
<p>CSSで　liに対してfloatさせると</p>
<pre name="code" class="css">#site #globalNavi {
	border-top: solid 4px #000;
	clear: both;
}
#globalNavi ul{

}
#globalNavi li{
	float: left;
}</pre>

<p>#globalNaviと#contentAreaの間にマージンが空いてしまう。</p>
<p>イロイロやってみた結果。<br />DOCTYPE宣言が原因だったみたいなので。とりあえずDOCTYPE宣言を</p>

<pre name="code" class="html">&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"&lt;"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;</pre>

<p>にして</p>
<pre name="code" class="css">#globalNavi ul{
	line-height:0;
}</pre>
<p>CSSでulにたいしてline-height:0;を指定したらなおった。</p>]]>
        
    </content>
</entry>

<entry>
    <title>[Flash + PHP + MySql] フラッシュからPHPに変数を送りDBに格納してXMLを書き出すサンプル</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/07/flash-php-mysql-phpdbxml.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.145</id>

    <published>2010-07-01T01:43:11Z</published>
    <updated>2010-07-01T04:24:18Z</updated>

    <summary>Fash,PHPで検索が多いので簡単なサンプルをアップしました。フラッシュからP...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="MySql" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="PHP" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="actionscript" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>Fash,PHPで検索が多いので簡単なサンプルをアップしました。</p><p>フラッシュからPHPに変数を送りPHP側でデータベースに送られて来た変数を保存してデータベースを元に<br />XMLを書き出しフラッシュ側でXMLを読み込み表示といった流れです。<br /></p><p>※ソースは整理してからアップします。<br /></p><p>以下サンプル<br />名前とコメントを入力してメッセージを送信すると下の部分に情報が反映されます。<br />(最新４件を表示してます。)<br /></p>

 <div id="phpSample">

</div>

<script type="text/JavaScript">
var so = new SWFObject("http://alwaysfinetuning.com/test/send.swf", "phpSample", "550", "700","9", "#ffffff");
so.addParam("menu", "false");
so.addParam("quality", "high");
so.write("phpSample");

</script>


]]>
        
    </content>
</entry>

<entry>
    <title>FlashDevelop 3.2.1で「Cannot find output file」というダイアログが出る</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/06/flashdevelop-321cannot-find-ou.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.144</id>

    <published>2010-06-22T03:03:41Z</published>
    <updated>2010-06-22T06:35:57Z</updated>

    <summary>FlashDevelpp3.2.1にアップデートして使ってたらswfを書き出す時...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>FlashDevelpp3.2.1にアップデートして使ってたら<br />swfを書き出す時に「Cannot find output file」ってダイアログが出てくるようになった。<br />急いでる時とかとてもうっとしいので直したいと思いググッてたら。<br />下記のサイトで解決策がのっていた。<br /><a href="http://www.flashdevelop.org/community/viewtopic.php?f=6&amp;t=6713&amp;start=0">http://www.flashdevelop.org/community/viewtopic.php?f=6&amp;t=6713&amp;start=0</a></p>


<p><b>1</b>：<br />下の画像の赤枠の部分をクリックして開く。</p>
<p><img src="http://alwaysfinetuning.com/ao-blog/fd1.jpg" alt="flashdevelop" /></p>

<p><b>2</b>：<br />そーするとプロジェクトのPropertiesの画面が開く。<br />Outputタブの中の<br /><strong>No output, only run pre / post build commands.</strong><br />
のチェックをはずす。
</p>

<p><b>3</b>：<br />で、Generalの中の<strong>Output file:</strong>にswfファイルのパスを設定する。</p>
<p><b>4</b>：<br />2:ではずしたチェックを元に戻す。<br />これでダイアログは出なくなりました。<br /><br />場合によって最初セキュリティソフトから警告画面が出ますが<br />一回許可すればそのあとは問題なく使えました。<br /></p>]]>
        
    </content>
</entry>

<entry>
    <title>[iPhoneAPP] RSSリーダー</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/06/iphoneapp-rss.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.143</id>

    <published>2010-06-18T07:56:06Z</published>
    <updated>2010-06-18T09:00:05Z</updated>

    <summary>勉強がてらiPhoneアプリでシンプルなRSSリーダーを作ってみたみました。右の...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="iPhone App" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="objective-c" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>勉強がてらiPhoneアプリでシンプルなRSSリーダーを作ってみたみました。<br />右のAO TESTと書かれたアイコンがそうです。</p>

<p>アイコンをタップすると左の画像ようにスライドして画面が切り替わります。<br />(今回は<a href="http://www.gizmodo.jp/">gizmodo japan</a>さんのxmlを拝借しました。)</p>

<p> <img src="http://alwaysfinetuning.com/ao-blog/iphone1.jpg" style="margin-right: 40px;" /><img src="http://alwaysfinetuning.com/ao-blog/iphone2.jpg" /></p>
<p>タイトルをタップすると横にスライドしフィードのタイトル一覧が表示されます。<br />(今見るとページのタイトルが若干違いますが気にしないでください。)<br /></p>
<p>気になるタイトルをタップするとSafariが起動しウェブサイトが表示されます。</p>
<p> <img src="http://alwaysfinetuning.com/ao-blog/iphone3.jpg" style="margin-right: 40px;" />
<img src="http://alwaysfinetuning.com/ao-blog/iphone4.jpg" /></p>

<p>ActionScriptと比べて、これだけの機能を実装するのにどんだけ面倒なんだよってちょっと思ってしまいましたが、<br />慣れればどうってことなくなるだろうと思うのでコツコツやることにします。</p><p>以下XMLを読んで表示するソース。<br />(行ごとの解説は後ほど書きます。)<br /></p>

<pre name="code" class="js">#import "ViewController2.h"


@implementation ViewController2

//! メモリワーニングをした際に呼ばれるメソッド
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
}

-(void)viewDidLoad{
	
	[super viewDidLoad];
	
	
	if(m_read_dat){
		[m_read_dat release];
	}
	if(m_table_dat){
		[m_table_dat release];
	}
	if(m_section_dic){
		[m_section_dic release];
	}
	if(m_index_ary){
		[m_index_ary release];
	}
	
	
	NSURL *url = [NSURL URLWithString:@"http://feeds.gizmodo.jp/rss/gizmodo/atom.xml"];
	NSXMLParser *ps = [[NSXMLParser alloc] initWithContentsOfURL:url];
	
	[ps setDelegate:(id)self];
	[ps setShouldProcessNamespaces:FALSE];
	[ps setShouldReportNamespacePrefixes:FALSE];
	[ps setShouldResolveExternalEntities:FALSE];
	
	
	m_read_dat = [[NSMutableArray alloc] init];
	m_readable = FALSE;
	[ps parse];
	[ps release];
	
	
	//Create Table
	NSMutableDictionary *indexed_name_dic = [[NSMutableDictionary alloc] init];
	
	self.title = @"gizmodo japan";
	
	for (NSDictionary *dic in m_read_dat){
	
		NSString	*name = [dic objectForKey:@"title"];
		NSString	*site = [dic objectForKey:@"blog_url"];
		NSString	*published = [dic objectForKey:@"published"];
		NSString	*group_key = [published substringWithRange:NSMakeRange(2,5)];
		
		NSMutableArray *group_name_ary = [indexed_name_dic objectForKey:group_key];
		
		
		if(group_name_ary == NULL){
			group_name_ary = [[NSMutableArray alloc] init];
			[indexed_name_dic setObject:group_name_ary forKey:group_key];
			[group_name_ary release];
		}
		
		NSDictionary *add_dic = [[NSDictionary alloc] initWithObjectsAndKeys:name,@"title",site,@"blog_url",nil];
		[group_name_ary addObject:add_dic];	
	}
	
	int		ct = 0;
	NSArray *ary = [[[indexed_name_dic allKeys] sortedArrayUsingSelector:@selector(compare:)] retain];
	
	m_index_ary = [[NSMutableArray alloc] init];
	for(ct = [ary count] - 1; ct &gt;= 0; --ct){
		
		[m_index_ary addObject:[ary objectAtIndex:ct]];
		
	}
	
	[ary release];
	
	NSSortDescriptor   *sort_desc = [[NSSortDescriptor alloc] initWithKey:@"title" ascending:NO];
	NSArray				*sort_desc_ary = [NSArray arrayWithObject:sort_desc];
	NSMutableArray		*temp = [[NSMutableArray alloc] init];
	
	for(NSString *index_char in m_index_ary){
		NSMutableArray *group_name_ary = [indexed_name_dic objectForKey:index_char];
		[group_name_ary sortUsingDescriptors:sort_desc_ary];
		
		NSDictionary *char_dic = [[NSDictionary alloc] initWithObjectsAndKeys:index_char,@"index",group_name_ary,@"name_ary",nil];
		[temp addObject:char_dic];
		[char_dic release];
	}
	[sort_desc release];	
	m_table_dat = temp;
}

//! テーブルビューのセクション数を返すメソッド
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
	return [m_table_dat count];
}

//! テーブルビューのセクションにある行の数を返すメソッド
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
	NSDictionary	*dic = [m_table_dat objectAtIndex:section];
	NSArray			*ary = [dic objectForKey:@"name_ary"];
	
	return [ary count];
}

//! テーブルビューのセクションヘッダの文字列を返すメソッド
- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
	NSDictionary	*section_dic = [m_table_dat objectAtIndex:section];
	
	return [section_dic valueForKey:@"index"];
}

//! テーブルビューのセクションインデックスのタイトル文字列の配列を返すメソッド
- (NSArray *)sectionIndexTitlesForTableView:(UITableView *)tableView {
	return [m_table_dat valueForKey:@"index"];
}

//! インデックスをタッチした際に呼ばれるメソッド
- (NSInteger)tableView:(UITableView *)tableView 
sectionForSectionIndexTitle:(NSString *)title 
			   atIndex:(NSInteger)index {
	return [m_index_ary indexOfObject:title];
}

//! テーブルにセルが表示される（出現する）際に呼ばれるメソッド
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    static NSString *CellIdentifier = @"Cell";
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
    }
    
    // Set up the cell...
	NSDictionary	*dic = [m_table_dat objectAtIndex:indexPath.section];
	NSArray			*ary = [dic objectForKey:@"name_ary"];
	NSDictionary	*name_dic = [ary objectAtIndex:indexPath.row];
	
	cell.textLabel.text = [name_dic objectForKey:@"title"];
	
    return cell;
}


//! セルが選択される直前に実行されるメソッド

- (NSIndexPath *)tableView:(UITableView *)tableView willSelectRowAtIndexPath:(NSIndexPath *)indexPath{
	static NSString *MyIdentifier = @"Cells";
	
	// Try to retrieve from the table view a now-unused cell with the given identifier
	UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
	
	// If no cell is available, create a new one using the given identifier
	if (cell == nil) {
		cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:MyIdentifier] autorelease];
	}
	
    // Set up the cell...
	NSDictionary	*dic = [m_table_dat objectAtIndex:indexPath.section];
	NSArray			*ary = [dic objectForKey:@"name_ary"];
	NSDictionary	*dic2 = [ary objectAtIndex:indexPath.row];
	
	// Safariを開いて、サイトに飛ぶ
	UIApplication *app = [UIApplication sharedApplication];
	[app openURL:[NSURL URLWithString:[dic2 objectForKey:@"blog_url"]]];
	
	return indexPath;
}

- (void)parser:(NSXMLParser *)parser 
didStartElement:(NSString *)elementName 
  namespaceURI:(NSString *)namespaceURI 
 qualifiedName:(NSString *)qName 
	attributes:(NSDictionary *)attributeDict
{
	// 要素名を保存（タグの名前）
	m_element_name = elementName;
	// <entry>タグ開始、辞書追加、フラグON
	if([elementName isEqualToString:@"entry"]){
		NSMutableDictionary		*dic = [[NSMutableDictionary alloc] init];
		
		[m_read_dat addObject:dic];
		m_readable = TRUE;
	}
	// <link>タグ
	if(m_readable &amp;&amp; [elementName isEqualToString:@"link"]){
		int		index;
		
		// 配列のインデックスを取得
		if([m_read_dat count] == 0){
			return;
		}
		index = [m_read_dat count];
		index = index - 1;
		if(index &lt;= 0){
			index = 0;
		}
		
		// 配列から辞書を取り出す
		NSMutableDictionary	*dic = [m_read_dat objectAtIndex:index];
		if(dic == nil){
			return;
		}
		
		// 辞書にURLを追加
		[dic setObject:[attributeDict valueForKey:@"href"] forKey:@"blog_url"];
	}
}

- (void)parser:(NSXMLParser *)parser 
 didEndElement:(NSString *)elementName 
  namespaceURI:(NSString *)namespaceURI 
 qualifiedName:(NSString *)qName{     
	// <entry>タグ終了、フラグOFF
	if([elementName isEqualToString:@"entry"]){
		m_readable = FALSE;
	}
}

- (void)parser:(NSXMLParser *)parser foundCharacters:(NSString *)string{
	int		index;
	
	// 配列のインデックスを取得
	if([m_read_dat count] == 0){
		return;
	}
	index = [m_read_dat count];
	index = index - 1;
	if(index &lt;= 0){
		index = 0;
	}
	
	// 配列から辞書を取り出す
	NSMutableDictionary	*dic = [m_read_dat objectAtIndex:index];
	
	if(dic == nil){
		return;
	}
	
	// フラグ
	if(!m_readable){
		return;
	}
	
	// <title>、</title><published>タグならば辞書に追加
	if([m_element_name isEqual:@"title"] || [m_element_name isEqual:@"published"]){
		[dic setObject:string forKey:m_element_name];
	}
	// 要素名を空にする
	m_element_name = @"";
}


@end</published></entry></entry></pre>]]>
        
    </content>
</entry>

<entry>
    <title>iPhoneアプリ開発の書籍</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/06/iphone-1.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.142</id>

    <published>2010-06-14T00:35:38Z</published>
    <updated>2010-06-14T02:06:37Z</updated>

    <summary>最近はずっとiPhoneアプリ開発の勉強中。 やる前はよくAS3と全然違ってて意...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="iPhone" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="objective-c" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="iphoneアプリ開発おすすめ書籍" label="iPhoneアプリ開発 おすすめ 書籍" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>最近はずっとiPhoneアプリ開発の勉強中。<br /></p>

<p>やる前はよくAS3と全然違ってて意味不明というような噂を耳にしましたが<br />実際やってみて思ったのは見た目が違うだけで全く違うってのは言いすぎな気がした。<br /></p><p>で、iPhoneアプリ開発用に現在3冊の本を購入。<br />最初に購入したのがこちら↓↓↓</p>

<div style="margin-top: 30px;">
<p><a href="http://www.amazon.co.jp/gp/product/4897978440?ie=UTF8&amp;tag=zactone-22&amp;linkCode=xm2&amp;camp=247&amp;creativeASIN=4897978440"><strong>iPhoneプログラミングUIKit詳解リファレンス</strong></a></p>
<p><a href="http://www.amazon.co.jp/gp/product/4897978440?ie=UTF8&amp;tag=zactone-22&amp;linkCode=xm2&amp;camp=247&amp;creativeASIN=4897978440"><img alt="iPhoneプログラミングUIKit詳解リファレンス" src="http://alwaysfinetuning.com/ao-blog/book_iphone1.jpg" /></a></p>
<p>まずUIKitって意味をわからず買ったのですが、<br />初心者でも序盤はなんとか着いて行ける感じです。<br />この本の特徴はインターフェースビルダーを使わずガンガン<br />コーディングしていくというスタンスなのでそんなハードコア<br />に最初からは無理って人は↓で紹介している本<br />「<a href="http://www.amazon.co.jp/gp/product/4798119687?ie=UTF8&amp;tag=zactone-22&amp;linkCode=xm2&amp;camp=247&amp;creativeASIN=4798119687">ライトウェイト・プログラマのためのiPhoneアプリ開発ガイド</a>」<br />を読むといいと思います。<br />がUIKitに特化した本なのでこれは持っておいた方がいいと思います。</p>

<div style="margin-top: 30px;">
<p><a href="http://www.amazon.co.jp/gp/product/4774138819?ie=UTF8&amp;tag=zactone-22&amp;linkCode=xm2&amp;camp=247&amp;creativeASIN=4774138819"><strong>iPhoneアプリケーションプログラミング</strong></a></p>
<p><a href="http://www.amazon.co.jp/gp/product/4774138819?ie=UTF8&amp;tag=zactone-22&amp;linkCode=xm2&amp;camp=247&amp;creativeASIN=4774138819"><img alt="iPhoneアプリケーションプログラミング" src="http://alwaysfinetuning.com/ao-blog/book_iphone2.jpg" /></a></p>
<p>この本は結構、解説おおめでした。<br />特に序盤は睡魔が牙を剥いて襲ってきます。<br />はじめに基本概念から固めたい人や夜眠れない人に<br />オススメな気がしました。<br /></p><p>が、一冊目の本で手動かしてやってた分、<br />細かい部分で理解が深まった感もあります。<br />この本の活用法としては電車の中とかでゆっくり読み進める用<br />にしてモヤモヤしてる部分がだんだんスッキリしてくる効果を<br />狙うのがいいかと思います。漢方みたいに。</p>
</div>
<p>で次に買った本がこれ</p>
<div id="osusume" style="margin-top: 30px;">
<p><a href="http://www.amazon.co.jp/gp/product/4798119687?ie=UTF8&amp;tag=zactone-22&amp;linkCode=xm2&amp;camp=247&amp;creativeASIN=4798119687"><strong>ライトウェイト・プログラマのためのiPhoneアプリ開発ガイド</strong></a></p>
<p><a href="http://www.amazon.co.jp/gp/product/4798119687?ie=UTF8&amp;tag=zactone-22&amp;linkCode=xm2&amp;camp=247&amp;creativeASIN=4798119687"><img alt="ライトウェイト・プログラマのためのiPhoneアプリ開発ガイド" src="http://alwaysfinetuning.com/ao-blog/book_iphone3.jpg" /></a></p>
<p>ジャケ買いです。<br />今まさに読書中なのですが、最初に買うならこの本だなと思います。<br />解説がわかりやすいしサンプルが充実してる。</p>
</div></div>]]>
        
    </content>
</entry>

<entry>
    <title>[Art] ピカソ</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/05/art.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.139</id>

    <published>2010-05-31T02:29:56Z</published>
    <updated>2010-05-31T07:15:18Z</updated>

    <summary>ピカソというとよくキュビズムの作品がクローズアップされがちだけど個人的には↓の頃...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="Art" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>ピカソというとよくキュビズムの作品がクローズアップされがちだけど個人的には↓の頃の絵が大好き。</p>
<p><img src="http://alwaysfinetuning.com/ao-blog/picaso1.jpg" alt="海辺を走る二人の女（駆けっこ）" /></p>
<p style="color: rgb(3, 110, 184);">[<strong>海辺を走る二人の女（駆けっこ）]</strong></p>

<p>この絵の爽快感がたまらない。<br />居間とかに飾ったら空間そのものがドカーンと広がった気分にしてくれそう。<br />まだ生でみた事がないのでいつかじっくりとぼんやりと眺めたい一枚。</p>

<p><img src="http://alwaysfinetuning.com/ao-blog/picaso2.jpg" alt="コリーダ：闘牛士の死" /></p>
<p style="color: rgb(3, 110, 184);"><strong>[コリーダ：闘牛士の死]</strong></p>
<p>闘牛士がどえらい事になってます。しかも馬が乱入してる(笑)。<br />とにかく画面全体にパワーが凝縮されたような絵。<br />個人的にはピカソの中でもダントツで好きな作品の一つ。<br /></p>こちらは10年位前に竹橋かどこかの美術館で見たんだけど意外とサイズは小さい。<br /><p>F12号ぐらいだった。<br />これぐらいパワーにあふれた絵を100号くらいで描いてみたい。</p>
]]>
        
    </content>
</entry>

<entry>
    <title>[API] Google Font API</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/05/api-google-font-api.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.137</id>

    <published>2010-05-21T09:20:21Z</published>
    <updated>2010-05-22T12:14:04Z</updated>

    <summary>Googleから「Google Font API」なるものが登場。今までウェブサ...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="API" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>Googleから「<a href="http://code.google.com/webfonts/preview">Google Font API</a>」なるものが登場。<br />今までウェブサイトでは限られたフォントしか使用できませんでしたが<br />このAPIを使えば簡単にいろんなフォントをウェブサイトに表示可能になるらしい。</p>

<p>下記のように書くだけで簡単に実装できる。</p>

<pre name="code" class="html">&lt;link  href="http://fonts.googleapis.com/css?family=Tangerine" rel="stylesheet" type="text/css" &gt;
&lt;style&gt;
body {
  font-family: "Tangerine", serif;
  font-size: 17pt;
  font-style: normal;
  font-weight: 400;
  text-shadow: none;
  text-decoration: none;
  text-transform: none;
  letter-spacing: 0;
  word-spacing: 0;
  line-height: 1;
}
&lt;/style&gt;</pre>]]>
        
    </content>
</entry>

<entry>
    <title>[iPhone App] Hello, World!</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/05/iphoneapp-hello-world.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.136</id>

    <published>2010-05-12T12:34:26Z</published>
    <updated>2010-05-13T02:22:39Z</updated>

    <summary>今日からiPhoneアプリ開発を始めました。  ...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="iPhone App" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="iphoneアプリ" label="iPhone アプリ" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>今日からiPhoneアプリ開発を始めました。<br /></p>

<img alt="iphone_app_hello_world" src="http://alwaysfinetuning.com/ao-blog/iphone_app_hello_world.jpg" style="margin: 20px auto;" /> ]]>
        
    </content>
</entry>

<entry>
    <title>[Music] STARDUST </title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/05/music-stardust.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.135</id>

    <published>2010-05-04T16:09:59Z</published>
    <updated>2010-05-04T16:52:47Z</updated>

    <summary>この曲ええわ～ ...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="Music" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>この曲ええわ～</p>
<object height="505" width="640"><param name="movie" value="http://www.youtube.com/v/UFm89LDS8ys&amp;hl=ja_JP&amp;fs=1&amp;" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><embed src="http://www.youtube.com/v/UFm89LDS8ys&amp;hl=ja_JP&amp;fs=1&amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" height="505" width="640"></object>
]]>
        
    </content>
</entry>

<entry>
    <title>Mac OS X 10.6 Snow LeopardとWZR-HP-G300NHを接続</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/04/mac-os-x-106-snow-leopardwzrhp.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.134</id>

    <published>2010-04-27T15:41:58Z</published>
    <updated>2010-04-27T16:33:23Z</updated>

    <summary>3日悩んでできたのでメモ。  【以下接続方法】 Mac OS X 10.6で付属...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>3日悩んでできたのでメモ。</p>

 <p>【以下接続方法】</p>
<p>Mac OS X 10.6で付属の接続ツールを使うと<br />「AirMacを入にして」とエラーが出て先に進めなくなるけど、<br />普通に手動で設定すれば接続できました。</p>
<ul>
<li>本体側面のラベルからSSIDと接続キーを確認<br /></li>

<li>上部メニューのAirMacアイコンをクリックすると近くの無線LANの一覧が表示されるから自分のSSIDを選択</li><li>&nbsp;パスワードを求められるので接続キーを入力これだけです。
<br />あとはデフォルトだとhttp://192.168.11.1/で設定画面に入れるので好きにいじくるのみ。 <br /></li><li>ちなみに、設定画面のログインIDはrootでパスワードは空欄でOKです。</li>
<ul>
</ul></ul>]]>
        
    </content>
</entry>

<entry>
    <title>[AS3] フォントの外部読み込み</title>
    <link rel="alternate" type="text/html" href="http://alwaysfinetuning.com/ao-blog/2010/04/as3-13.html" />
    <id>tag:alwaysfinetuning.com,2010:/ao-blog//1.133</id>

    <published>2010-04-26T07:32:08Z</published>
    <updated>2010-04-26T09:35:09Z</updated>

    <summary>Flashで埋め込み日本語フォントを使うと書き出しやロードに時間がかかるので、外...</summary>
    <author>
        <name>青</name>
        <uri>http://ああ</uri>
    </author>
    
        <category term="actionscript3.0" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://alwaysfinetuning.com/ao-blog/">
        <![CDATA[<p>Flashで埋め込み日本語フォントを使うと書き出しやロードに時間がかかるので、<br />外部にフォントシンボルだけのswfファイルを用意してそれを読み込むのを簡単に<br />できるようにクラスにしてみました。</p>
<p>サンプル</p>
<div id="fontLoader">

</div>


<script type="text/JavaScript">
var so = new SWFObject("http://alwaysfinetuning.com/ao-blog/2010/04/test.swf", "video", "700", "400","9", "#FFFFFF");
so.addParam("menu", "false");
so.addParam("quality", "high");
so.write("fontLoader");

</script>]]>
        <![CDATA[
<p>コード</p>
<pre name="code" class="js">package {
	
	import flash.display.MovieClip;
	import flash.net.URLRequest;
	import flash.display.Loader;
	import flash.system.LoaderContext;
	import flash.display.LoaderInfo;
	import flash.system.ApplicationDomain;
	import flash.text.Font;
	import flash.events.Event;
	
	public class FontLoader extends MovieClip {
		private var url:URLRequest;
		private var context :LoaderContext;
		private var loader:Loader;
		public var f:Font;
		private var Font1:Class;
		private var info:LoaderInfo;
		
		public static const FONT_LOAD_COMPLETE:String  = "font_load_complete";
		
		public function FontLoader(_url:String):void {
			url = new URLRequest(_url);
			init();
		}
		
		private function init():void {
			loader = new Loader();
			info = loader.contentLoaderInfo;
			loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onLoadComplete);
			context = new LoaderContext();
			context.applicationDomain = ApplicationDomain.currentDomain;
			loader.load( url, context);
		}
		
		private function onLoadComplete(e:Event):void {
			loader.contentLoaderInfo.removeEventListener( Event.COMPLETE, onLoadComplete);
			Font1 = ApplicationDomain.currentDomain.getDefinition("Font1") as Class;
			Font.registerFont(Font1);
			f = new Font1();
			dispatchEvent(new Event(FONT_LOAD_COMPLETE));
		}
		
		public function getFont():Font {
			return f;
		}
		
	}
	
}</pre> 
<p>使い方</p>
<p>1：まず読み込むフォントだけのswfファイルを以下の手順で用意。</p>
<ul>
<li>Flashのライブラリメニューから「新しいフォント」を選択し、フォントシンボルを作成</li>

<li>フォントシンボルを右クリックし、「リンケージ」を選択、「ActionScriptに書き出し」をチェックし、適当なクラス名（サンプルはFont1になっています）を入力。</li>
</ul>

<p>2：読み込む側のソースは以下のように設定します。</p>
<pre name="code" class="js">private var fontLoader:FontLoader;
fontLoader = new FontLoader("fontが入ったswfファイルのパス");
fontLoader.addEventListener(FontLoader.FONT_LOAD_COMPLETE, setText);</pre>
<p>フォントのロードが完了すると<strong>FONT_LOAD_COMPLETE</strong>が送られ、<strong>setText()</strong>関数が呼び出されます。<br />そーすると下記のようにフォントを任意のテキストフィールドに埋め込みする事ができます。</p>
<pre name="code" class="js">var format:TextFormat = new TextFormat();
format.font = fontLoader.getFont().fontName;</pre>
<p>以下ソース全文</p>
<pre name="code" class="js">package  
{
	import flash.display.MovieClip;
	import flash.events.Event;
	import flash.text.TextField;
	import flash.text.TextFormat;
	import flash.text.TextFieldAutoSize;
	
	public class Test extends MovieClip{
		
		private var fontLoader:FontLoader;
		
		public function Test() {
			fontLoader = new FontLoader("fontが入ったswfファイルのパス");
			fontLoader.addEventListener(FontLoader.FONT_LOAD_COMPLETE, setText);
		}
		
		private function setText(e:Event) {
			var format:TextFormat = new TextFormat();
			
			format.font = fontLoader.getFont().fontName;
			format.size = 36;
			format.color = 0xffffff;
			var tf:TextField = new TextField();
			tf.embedFonts = true;
			tf.defaultTextFormat = format;
			tf.multiline = true;
			tf.autoSize = TextFieldAutoSize.LEFT;
		
			tf.text = "あいうえお\nかきくけこ\nさしすせそ\nたちつてと\nなにぬねの\nはひふへほ\nまみむめも\nやゆよ\nらりるれろ\nわをん";
			tf.x = 0;
			addChild(tf);
			
		}
		
	}

}</pre>]]>
    </content>
</entry>

</feed>

