<?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/"
		xmlns:xhtml="http://www.w3.org/1999/xhtml"
>

<channel>
	<title>Astronika blog &#187; AS3</title>
	<atom:link href="http://astronika.com/blog/category/as3/feed" rel="self" type="application/rss+xml" />
	<link>http://astronika.com/blog</link>
	<description>Flashの勉強をしているフリーランス</description>
	<lastBuildDate>Tue, 08 Sep 2009 15:29:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://astronika.com/blog/category/as3/feed" />
		<item>
		<title>FMSでハマッたことのメモ[AS3]</title>
		<link>http://astronika.com/blog/2009/09/09-002923.php</link>
		<comments>http://astronika.com/blog/2009/09/09-002923.php#comments</comments>
		<pubDate>Tue, 08 Sep 2009 15:29:23 +0000</pubDate>
		<dc:creator>astronika</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://astronika.com/blog/?p=83</guid>
		<description><![CDATA[				FMSでの動画再生をコンポーネントではなく自作のプレーヤーで再生しようとした時、
				なんだかいろいろエラーが出たので、忘れないためにメモ。
				１．onBWDoneが無いってエラー。
				FMS3.0からのエラーらしく、client オブジェクトに対してエラーをcallしてくる。
				知らない間にバージョンアップされていたので、気付くのに時間がかかった。
				そこで、Client用のカスタムクラスで定義。
				
class NetStreamClient extends EventDispatcher {
 public function onMetaData(info:Object):void {
 }
 public function onCuePoint(info:Object):void {
 }
 public function onPlayStatus(info:Object):void {
 }
 public function onXMPData(info:Object):void {
 };
 public function onBWDone():void {
 };
}
&#60;pre&#62;
				
				参考サイト：
				・H.264 動画を Flash Media Server 3 より Streaming 再生
]]></description>
			<content:encoded><![CDATA[				<p>FMSでの動画再生をコンポーネントではなく自作のプレーヤーで再生しようとした時、<br />
				なんだかいろいろエラーが出たので、忘れないためにメモ。</p>
				<p>１．onBWDoneが無いってエラー。<br />
				FMS3.0からのエラーらしく、client オブジェクトに対してエラーをcallしてくる。<br />
				知らない間にバージョンアップされていたので、気付くのに時間がかかった。<br />
				そこで、Client用のカスタムクラスで定義。</p>
				<pre class="brush: as3;">
class NetStreamClient extends EventDispatcher {
 public function onMetaData(info:Object):void {
 }
 public function onCuePoint(info:Object):void {
 }
 public function onPlayStatus(info:Object):void {
 }
 public function onXMPData(info:Object):void {
 };
 public function onBWDone():void {
 };
}
&lt;pre&gt;</pre>
				</pre>
				<p>参考サイト：<br />
				・<a href="http://dev.convexstyle.net/2008/03/h264_flash_media_server_3_stre.html" target="_blank">H.264 動画を Flash Media Server 3 より Streaming 再生</a></p>
]]></content:encoded>
			<wfw:commentRss>http://astronika.com/blog/2009/09/09-002923.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://astronika.com/blog/2009/09/09-002923.php" />
	</item>
		<item>
		<title>Box2Dを今さら始める[AS3メモ]</title>
		<link>http://astronika.com/blog/2009/07/02-235023.php</link>
		<comments>http://astronika.com/blog/2009/07/02-235023.php#comments</comments>
		<pubDate>Thu, 02 Jul 2009 14:50:23 +0000</pubDate>
		<dc:creator>astronika</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://astronika.com/blog/?p=55</guid>
		<description><![CDATA[				すごい今さらなんですが、なかなか手を着けられなかったBox2Dを始めました。
				以前は参考本やらサイトを見てもあまりよく解らなかったけど、最近ならばいけそうな気がする・・・。
				参考にしたサイトは、
				・gihyo.jpの「Box2DでActionScript物理プログラミング」の第１～２回
				・てっく煮ブログ様の「Box2DFlashAS3 の単純なサンプルと使い方 (2.0.2版)」と「DebugDraw を使わない Box2DFlashAS3 のサンプル (2.0.2版)」
				で、そこのサンプルをほぼ移植しつつ、「wonderfl」を参考に幾つか手直し。
				aboutページ用のイメージFlashとして作成してみた。
				外部XMLとJPGで中身を更新するようにしてみたとか。
				
]]></description>
			<content:encoded><![CDATA[				<p>すごい今さらなんですが、なかなか手を着けられなかったBox2Dを始めました。<br />
				以前は参考本やらサイトを見てもあまりよく解らなかったけど、最近ならばいけそうな気がする・・・。</p>
				<p>参考にしたサイトは、<br />
				・gihyo.jpの「<a href="http://gihyo.jp/dev/feature/01/box2d">Box2DでActionScript物理プログラミング</a>」の第１～２回<br />
				・てっく煮ブログ様の「<a href="http://d.hatena.ne.jp/nitoyon/20090428/box2dflashas3_2_0_2">Box2DFlashAS3 の単純なサンプルと使い方 (2.0.2版)</a>」と「<a href="http://d.hatena.ne.jp/nitoyon/20090430/box2d_no_debug_draw">DebugDraw を使わない Box2DFlashAS3 のサンプル (2.0.2版)</a>」<br />
				で、そこのサンプルをほぼ移植しつつ、「<a href="http://wonderfl.net/">wonderfl</a>」を参考に幾つか手直し。</p>
				<p>aboutページ用のイメージFlashとして作成してみた。<br />
				外部XMLとJPGで中身を更新するようにしてみたとか。</p>
				<p><a href="/blog/about/"><img class="alignnone" src="/blog/images/20090702_001.jpg" alt="" width="330" height="250" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://astronika.com/blog/2009/07/02-235023.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://astronika.com/blog/2009/07/02-235023.php" />
	</item>
		<item>
		<title>外部SWFのクラスを親から使いたい[AS3メモ]</title>
		<link>http://astronika.com/blog/2008/09/30-183352.php</link>
		<comments>http://astronika.com/blog/2008/09/30-183352.php#comments</comments>
		<pubDate>Tue, 30 Sep 2008 09:33:52 +0000</pubDate>
		<dc:creator>astronika</dc:creator>
				<category><![CDATA[AS3]]></category>

		<guid isPermaLink="false">http://astronika.com/wordpress/?p=13</guid>
		<description><![CDATA[				AS3クラスでの開発でぶちあたった問題。
				読み込んだ外部SWFのリンケージに設定しているクラスを、親のSWF（クラス）側から呼び出したかったんだけど、うまくいかない。AS3にまだ慣れてないのもあり、調べて見る。
				いろいろググってみると、同じような悩みがあってどうやら「ApplicationDomain」を使えばいいとのこと。とは言え、試してみても「ReferenceError: Error #1065: 変数 AboutPage は定義されていません。」と怒られるだけ。数時間の格闘の末、何とか解決風。
				
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
//URL
var urlReq:URLRequest = new URLRequest(url);
var context:LoaderContext = new LoaderContext();
context.applicationDomain = ApplicationDomain.currentDomain;
//読み込み開始
_loader.load(urlReq, context);

				で読み込み段階で設定。読み込み後に
				
//読み込み完了
function onLoaded(event:Event):void {
var className:String = &#34;xxxxx&#34;;
var target:* = event.target.content;
var myDomain:ApplicationDomain = _loader.contentLoaderInfo.applicationDomain;
var myClassRef:Class = myDomain.getDefinition(&#34;classes.pages.&#34; + className) as Class;
var classObj:Object = new myClassRef();
classObj.f_test();
}

				で、正解なのかわからないけど、子クラスのf_test()が呼べたようだ～
]]></description>
			<content:encoded><![CDATA[				<p>AS3クラスでの開発でぶちあたった問題。</p>
				<p>読み込んだ外部SWFのリンケージに設定しているクラスを、親のSWF（クラス）側から呼び出したかったんだけど、うまくいかない。<br />AS3にまだ慣れてないのもあり、調べて見る。</p>
				<p>いろいろググってみると、同じような悩みがあってどうやら「ApplicationDomain」を使えばいいとのこと。<br />とは言え、試してみても「ReferenceError: Error #1065: 変数 AboutPage は定義されていません。」と怒られるだけ。<br />数時間の格闘の末、何とか解決風。</p>
				<pre class="brush: as3;">
_loader = new Loader();
_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
//URL
var urlReq:URLRequest = new URLRequest(url);
var context:LoaderContext = new LoaderContext();
context.applicationDomain = ApplicationDomain.currentDomain;
//読み込み開始
_loader.load(urlReq, context);
</pre>
				<p>で読み込み段階で設定。読み込み後に</p>
				<pre class="brush: as3;">
//読み込み完了
function onLoaded(event:Event):void {
var className:String = &quot;xxxxx&quot;;
var target:* = event.target.content;
var myDomain:ApplicationDomain = _loader.contentLoaderInfo.applicationDomain;
var myClassRef:Class = myDomain.getDefinition(&quot;classes.pages.&quot; + className) as Class;
var classObj:Object = new myClassRef();
classObj.f_test();
}
</pre>
				<p>で、正解なのかわからないけど、子クラスのf_test()が呼べたようだ～</p>
]]></content:encoded>
			<wfw:commentRss>http://astronika.com/blog/2008/09/30-183352.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<xhtml:link rel="alternate" media="handheld" type="text/html" href="http://astronika.com/blog/2008/09/30-183352.php" />
	</item>
	</channel>
</rss>
