<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
    <title>ActionScript 3.0入門ノート CS4</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/" />
    <link rel="self" type="application/atom+xml" href="http://oshige.com/flash/as3note_cs4/atom.xml" />
    <id>tag:oshige.com,2008-11-24:/flash/as3note_cs4//27</id>
    <updated>2010-02-24T15:13:07Z</updated>
    <subtitle>Adobe Flash CS4 詳細！ActionScript 3.0入門ノート[完全改訂版]サポートページ：大重美幸</subtitle>
    <generator uri="http://www.sixapart.com/movabletype/">Movable Type Open Source 4.1</generator>

<entry>
    <title>Adobe EDGE newsletter 第6回 2010.2</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2010/02/adobe-edge-newsletter-6-20102.html" />
    <id>tag:oshige.com,2010:/flash/as3note_cs4//27.3934</id>

    <published>2010-02-24T14:12:13Z</published>
    <updated>2010-02-24T15:13:07Z</updated>

    <summary> Adobe EDGE newsletter第6回 『大重美幸のこれ見落としてま...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="sample" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="連載Adobe EDGE" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="image.jpg" src="http://oshige.com/flash/as3note_cs4/images/image.jpg" width="204" height="110" class="mt-image-none" style="" /></span>
<br>
Adobe EDGE newsletter第6回<br>
<strong>『大重美幸のこれ見落としてませんか？ ActionScript 3.0』</strong><br>
『<a href="http://www.adobe.com/jp/newsletters/edge/february2010/articles/article3/index.html" target="edge">柔軟・多彩・高速な画像処理を実現するシェーダーフィルタ</a>』が公開されました。<br><br>
今回のテーマは、Flash CS4（Flash Player 10）の新機能として登場した「シェーダーフィルタ」です。シェーダーフィルタとは、Pixel Bender Toolkitで作成したシェーダープログラムを読み込んで作るフィルタです。シェーダーフィルタはビットマップ、ベクトル、FLVと表示オブジェクトに適用でき、複雑なエフェクトもリアルタイムで処理する実行速度の速さが特長です。<br>
<br>
<script type="text/javascript" src="http://oshige.com/flash/as3note_cs4/samples/swfobject.js"></script>
		<script type="text/javascript">
			swfobject.registerObject("twirlShader", "10.0.0", "http://oshige.com/flash/as3note_cs4/samples/expressInstall.swf");
		</script>
<div>
			<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="400" height="300" id="twirlShader">
				<param name="movie" value="http://oshige.com/flash/as3note_cs4/samples/edge5/twirlShader.swf" />
				<!--[if !IE]>-->
				<object type="application/x-shockwave-flash" data="http://oshige.com/flash/as3note_cs4/samples/edge5/twirlShader.swf" width="400" height="300">
				<!--<![endif]-->
					<a href="http://www.adobe.com/go/getflashplayer">
						<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
					</a>
				<!--[if !IE]>-->
				</object>
				<!--<![endif]-->
			</object>
		</div>]]>
        
    </content>
</entry>

<entry>
    <title>Adobe EDGE newsletter 第5回 2010.1</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2010/01/adobe-edge-newsletter-5-201027.html" />
    <id>tag:oshige.com,2010:/flash/as3note_cs4//27.3929</id>

    <published>2010-01-27T14:20:23Z</published>
    <updated>2010-02-24T14:13:21Z</updated>

    <summary> Adobe EDGE newsletter第5回 『大重美幸のこれ見落としてま...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="連載Adobe EDGE" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[<p><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="image.jpg" src="http://oshige.com/flash/as3note_cs4/images/image.jpg" width="204" height="110" class="mt-image-none" style="" /></span></p>

<p>Adobe EDGE newsletter第5回<br />
<strong>『大重美幸のこれ見落としてませんか？ ActionScript 3.0』</strong><br />
『<a href="http://www.adobe.com/jp/newsletters/edge/january2010/articles/article3/index.html" target="adobe">スクリプトでフィルタを適用する方法</a>』が公開されました。<br />
今回はフィルタがテーマです。表示オブジェクト、ビットマップデータにフィルタを適用する方法を解説します。</p>]]>
        
    </content>
</entry>

<entry>
    <title>正誤表20100109</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2010/01/20100109.html" />
    <id>tag:oshige.com,2010:/flash/as3note_cs4//27.3917</id>

    <published>2010-01-09T01:50:37Z</published>
    <updated>2010-01-09T01:54:25Z</updated>

    <summary>■この訂正は初版のものです。 p.89　見出し「乱数を作る」の4行目、スクリプト...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="正誤表（初版）" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[<p>■この訂正は初版のものです。</p>

<p>p.89　見出し「乱数を作る」の4行目、スクリプト見出し<br />
<blockquote>誤：1〜10の乱数<br />
正：1〜10の整数の乱数</blockquote></p>

<p>p.159　本文1行目<br />
<blockquote>誤：その再生に到達したら<br />
正：そのフレームに到達したら</blockquote></p>]]>
        
    </content>
</entry>

<entry>
    <title>Adobe EDGE newsletter 第4回 2009.12</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/12/adobe-edge-newsletter-4-200912.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3911</id>

    <published>2009-12-23T04:36:11Z</published>
    <updated>2010-01-27T14:19:49Z</updated>

    <summary> Adobe EDGE newsletter第4回 『大重美幸のこれ見落としてま...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="情報、その他" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="連載Adobe EDGE" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[<p><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="image.jpg" src="http://oshige.com/flash/as3note_cs4/images/image.jpg" width="204" height="110" class="mt-image-none" style="" /></span></p>

<p>Adobe EDGE newsletter第4回<br />
<strong>『大重美幸のこれ見落としてませんか？ ActionScript 3.0』</strong><br />
『<a href="http://www.adobe.com/jp/newsletters/edge/december2009/articles/article3/index.html" target="adobe">FLVをウィンドウ／画面全体に表示する</a>』が公開されました。<br />
今回はFLVの変形とフルスクリーン表示がテーマです。前回の宿題の回答もありますよ。</p>]]>
        
    </content>
</entry>

<entry>
    <title>公式Papervison3D 日本語フォーラム</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/12/papervison3d.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3897</id>

    <published>2009-12-02T02:06:58Z</published>
    <updated>2009-12-02T02:08:05Z</updated>

    <summary>公式のPapervison3D日本語フォーラムてのができましたよ。...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="情報、その他" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[公式の<a href="http://forum.papervision3d.jp/">Papervison3D日本語フォーラム</a>てのができましたよ。]]>
        
    </content>
</entry>

<entry>
    <title>Building iPhone Applications with Flash CS5</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/12/building-iphone-applications-w.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3895</id>

    <published>2009-12-01T23:52:29Z</published>
    <updated>2009-12-02T00:04:20Z</updated>

    <summary>FITCで紹介された「Flash CS5で作るiPhone App」のスライドを...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="情報、その他" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[<p>FITCで紹介された「Flash CS5で作るiPhone App」のスライドを見ることができますよ。</p>

<p><br />
FITC Edmonton Slides : <a href="http://www.mikechambers.com/blog/2009/10/20/fitc-edmonton-slides-building-iphone-applications-with-flash-cs5/">Building iPhone applications with Flash CS5</a><br />
（Mike Chambers）</p>]]>
        
    </content>
</entry>

<entry>
    <title>最大23%OFF 「複数割」受講チケット</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/11/23off.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3887</id>

    <published>2009-11-28T20:48:38Z</published>
    <updated>2009-11-28T21:09:42Z</updated>

    <summary>ロクナナワークショップで「最大23%OFF 複数割」が始まりました！ 有効期限は...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="情報、その他" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[<p>ロクナナワークショップで「<a href="http://67.org/ws/news/20091126_01.html">最大23%OFF 複数割</a>」が始まりました！<br />
有効期限は一年間。全ての講座で利用できます。</p>

<p>企業研修や新人研修で複数の講座を利用したい！お友達・会社の同僚と一緒にいろんな講座を受講したい！そんな方に必見のキャンペーンです。</p>

<p>詳しくは、ロクナナワークショップNEWS [<a href="http://67.org/ws/news/20091126_01.html">複数割」受講チケット最大23%OFF</a>]</p>

<p><span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="67ws_bnr_23off.gif" src="http://oshige.com/flash/as3note_cs4/images/67ws_bnr_23off.gif" width="150" height="110" class="mt-image-none" style="" /></span></p>

<p>※ぼくのActionScript3.0セミナーは来年1月21日と1月28日です。</p>

<p><a href="http://67.org/ws/workshop/detail/048as.html">大重美幸のActionScript 3.0初級講座（前半）</a>　2010年1月21日<br />
<a href="http://67.org/ws/workshop/detail/051as.html">大重美幸のActionScript 3.0初級講座（後半）</a>　2010年1月28日</p>]]>
        
    </content>
</entry>

<entry>
    <title>Adobe EDGE newsletter 第3回 2009.11</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/11/post-63.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3884</id>

    <published>2009-11-25T11:26:07Z</published>
    <updated>2009-12-23T04:35:02Z</updated>

    <summary> Adobe EDGE newsletter第3回 『大重美幸のこれ見落としてま...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="情報、その他" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="連載Adobe EDGE" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[<p><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="image.jpg" src="http://oshige.com/flash/as3note_cs4/images/image.jpg" width="204" height="110" class="mt-image-none" style="" /></span></p>

<p>Adobe EDGE newsletter第3回<br />
<strong>『大重美幸のこれ見落としてませんか？ ActionScript 3.0』</strong><br />
『<a href="http://www.adobe.com/jp/newsletters/edge/november2009/articles/article4/index.html" target="adobe">配列の値の並べ替えをマスターする</a>』が公開されました。</p>

<p>今回のテーマは配列の値の並べ替えです。配列は複数の値を管理したいときに便利な機能です。CS4 からは配列を扱うクラスに Vector クラスが加わりましたが、基本的には Array クラスと同じです。配列を使うときに、よく分からなくて、頭の中が混乱していませんか？　配列を使いこなせてこそ一人前。配列を使ってスマートなスクリプトを書きましょう。</p>]]>
        
    </content>
</entry>

<entry>
    <title>クラスメンバー定義のサンプル追加Friend4</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/11/friend4.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3883</id>

    <published>2009-11-16T09:41:43Z</published>
    <updated>2009-11-16T10:24:09Z</updated>

    <summary>「Section08-01 クラス定義の構造」の「クラスメンバーを定義する」（p...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="Chap08 クラス定義" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="sample" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="補足・追加原稿" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="static" label="static" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[「Section08-01 クラス定義の構造」の「クラスメンバーを定義する」（p.245）にサンプルを追加します。このサンプルのポイントは、コンストラクタにおいてクラスプロパティfriendListにインスタンスの参照であるthisを登録することで、作ったインスタンスを管理しているところです。<br>
<br>
[:script:]Friend4クラスの定義<br>
<pre class="brush: as3, first-line: 1">
package {
  public class Friend4 {
    //クラスプロパティ
    public static var seqNo:uint;
    public static var friendList:Array=new Array();
    //インスタンスプロパティ
    public var no:uint;
    public var name:String;
    public var age:uint;
    //コンストラクタ
    public function Friend4(na:String,ag:uint) {
      no= ++seqNo;
      name=na;
      age=ag;
      //インスタンスのリストに参照を保管する
      friendList.push(this);
    }
    //
    // クラスメソッド
    //
    //平均年齢を求める
    public static function getAgeAverage():Number {
      if (friendList.length==0) {
        return 0;
      } else {
        var ageSum:uint;
        //年齢の合計を出す
        for (var i:int=0; i&lt;friendList.length; i++) {
          var friend:Friend4=friendList[i];
          ageSum+=friend.age;
        }
        //平均を計算する
        var ave:Number=ageSum/friendList.length;
        //小数点2位で四捨五入する
        ave=Math.round(ave*10)/10;
        return ave;
      }
    }
    //最年長を求める
    public static function getOldestProfile():String {
      if (friendList.length==0) {
        return null;
      } else {
        //friendListの複製
        var tmpList:Array=friendList.slice();
        //年齢でソートする
        tmpList.sortOn("age",Array.NUMERIC);
        //最後の人を取り出す
        var oldest:Friend4=tmpList[tmpList.length-1];
        //プロフィールを返す（インスタンスメソッドの実行）
        return oldest.getProfile();
      }
    }
    //
    // インスタンスメソッド
    //
    //プロフィールを返す
    public function getProfile():String {
      var info:String="no."+no+" "+name+"、"+age+"歳です。";
      return info;
    }
  }
}
</pre>

→<a href="http://oshige.com/flash/as3note_cs4/samples/sample08/sample08_01/class_Friend4_static.zip">ファイル一式をダウンロードする</a>。<br>]]>
        
    </content>
</entry>

<entry>
    <title>外部イメージ読み込み完了イベント処理 simple</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/11/-simple-1.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3882</id>

    <published>2009-11-16T02:54:26Z</published>
    <updated>2009-11-16T09:41:20Z</updated>

    <summary>Section14-01 外部イメージファイルを読み込んでフェードインで表示する...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="Chap14 外部ファイルの読み込み" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="sample" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="補足・追加原稿" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="contentloaderinfo" label="contentLoaderInfo" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="dropshadowfilter" label="DropShadowFilter" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="loader" label="Loader" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="tween" label="Tween" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="フェードイン" label="フェードイン" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[Section14-01 外部イメージファイルを読み込んでフェードインで表示するスクリプト（p.406）のサンプルはLoaderクラスを継承した作りになっているために難しいかもしれません。そこでフレームアクションで実行できるシンプルな例を紹介しておきます。<br>
このスクリプトのポイントは、画像ファイルの読み込み完了イベントEvent.COMPLETEのリスナーをLoaderのインスタンスのcontentLoaderInfoプロパティにaddEventListener()する部分です。（6行目）<br>
<br>
[:script:]読み込み完了後にフェードインで表示する<br>
<pre class="brush: as3, first-line: 1">
//読み込む画像ファイルを指定する
var url:String = "image/IMG_8171.jpg";
var urlReq:URLRequest = new URLRequest(url);
//ローダーを作る
var photoLoader:Loader=new Loader();
photoLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoaded);
//画像を読み込む
photoLoader.load(urlReq);
//画像を表示する
photoLoader.x = 100;
photoLoader.y = 50;
addChild(photoLoader);
//ドロップシャドウを付ける
var dsf:DropShadowFilter=new DropShadowFilter();
dsf.alpha = 0.8;
photoLoader.filters = [dsf];

import fl.transitions.Tween;
import fl.transitions.easing.*;
var tw:Tween;
//フェードインで表示する
function onLoaded(eventObj:Event):void {
	tw = new Tween(photoLoader,"alpha",Regular.easeInOut,0,1,1,true);
}
</pre>
<br>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://oshige.com/flash/as3note_cs4/images/fadein.jpg"><img alt="fadein.jpg" src="http://oshige.com/flash/as3note_cs4/images/fadein-thumb-240x164.jpg" width="240" height="164" class="mt-image-none" style="" /></a></span><br>
→<a href="http://oshige.com/flash/as3note_cs4/samples/sample14/sample14_01/loader_fadeIn_simple/loader_fadeIn_simple.html" target="new">swfを試す</a><br><br>
→<a href="http://oshige.com/flash/as3note_cs4/samples/sample14/sample14_01/loader_fadeIn_simple.zip">ファイル一式をダウンロードする</a>。<br>]]>
        
    </content>
</entry>

<entry>
    <title>外部テキストファイルの読み込み simple</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/11/-simple.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3868</id>

    <published>2009-11-07T04:36:16Z</published>
    <updated>2009-11-16T02:53:54Z</updated>

    <summary>Section14-02 テキストファイルの読み込み（p.408）のサンプルはち...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="Chap14 外部ファイルの読み込み" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="補足・追加原稿" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="textfield" label="TextField" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="textformat" label="TextFormat" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="urlloader" label="URLLoader" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="urlrequest" label="URLRequest" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[Section14-02 テキストファイルの読み込み（p.408）のサンプルはちょっとややこしいので、フレームアクションで実行できるシンプルな例を紹介しておきます。<br>
<br>
なお、1〜18行目までは読み込んだテキストデータを表示するためのテキストフィールドを作っています。あらかじめ作ってあるテキストフィールドに表示するならば、この部分は必要ありません。<br>
<br>
UTFファイルを読み込む例を示していますが、Shift-JISのファイルを読み込む場合は24行目のSystem.useCodePageの値をtrueに設定します。<br>
<br>
[:script:]テキストフィールドを作り、外部テキストファイルを読み込む<br>
<pre class="brush: as3, first-line: 1">
import flash.text.TextFieldAutoSize;
//テキストフィールドを作る
var fld:TextField=new TextField();
fld.x = 100;
fld.y = 50;
fld.width = 280;
fld.height = 180;
fld.border = true;
fld.multiline = true;
fld.wordWrap = true;
fld.autoSize = TextFieldAutoSize.LEFT;
addChild(fld);
//書式の設定
var tf:TextFormat = new TextFormat();
tf.size = 18;
tf.color = 0x333333;
fld.defaultTextFormat = tf;

//URLLoaderのインスタンスを作る
var txtloader=new URLLoader();
var urlReq:URLRequest=new URLRequest();
urlReq.url = "./data/sample_utf.txt";
//unicodeならばfalse
System.useCodePage = false;
txtloader.load(urlReq);
//読み完了イベントのリスナーを登録する
txtloader.addEventListener(Event.COMPLETE,completeHandler);
//リスナー関数
function completeHandler(eventObj:Event):void {
	//読み込んだテキストをフィールドに表示する
	fld.text = txtloader.data;
}
</pre>
<br>
→<a href="<a href="http://oshige.com/flash/as3note_cs4/samples/sample14/sample14_02/textLoader_simple.zip">ファイル一式をダウンロードする</a>。<br>]]>
        
    </content>
</entry>

<entry>
    <title>ActionScript3.0辞典は800ページ</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/11/actionscript30800.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3867</id>

    <published>2009-11-06T06:18:39Z</published>
    <updated>2009-11-06T08:51:38Z</updated>

    <summary>新しい本のお知らせです。翔泳社より「ActionScript3.0辞典[Flas...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="情報、その他" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[<p>新しい本のお知らせです。翔泳社より「ActionScript3.0辞典[FlashPlayer10/9対応]」が発売になります。800ページという箱のようなボリュームです。<br />
（だから表紙デザインは段ボール箱になっている）</p>

<p>大重美幸、植木友浩、林拓也、野中文雄、伊藤のりゆき (順不同) の5人の共著です。<br />
価格2980円+税、発行日は11/17です。どうぞよろしくお願いします。</p>

<p><img src="http://ecx.images-amazon.com/images/I/51VoLCpnJRL._SL160_.jpg" border="0" alt="4798119016" /></a><br /><br />
<a href="http://www.amazon.co.jp/exec/obidos/ASIN/4798119016/oshiget-22/ref=nosim/" target="_top">ActionScript3.0辞典[FlashPlayer10/9対応]</a><br /><a href="http://www.amazon.co.jp/exec/obidos/ASIN/4798119016/oshiget-22/ref=nosim/" target="_top"></p>]]>
        
    </content>
</entry>

<entry>
    <title>プログレスバーloaderInfoとcontentLoaderInfo</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/11/loaderinfoprogress.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3865</id>

    <published>2009-11-02T07:52:43Z</published>
    <updated>2009-11-02T08:19:44Z</updated>

    <summary>最初にswfを表示する際の読み込み待ちについて簡単に紹介しましょう。AS2までは...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="補足・追加原稿" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="bytesloaded" label="bytesLoaded" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="contentloaderinfo" label="contentLoaderInfo" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="framesloaded" label="framesLoaded" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="loaderinfo" label="loaderInfo" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="progressevent" label="ProgressEvent" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="totalframes" label="totalFrames" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[最初にswfを表示する際の読み込み待ちについて簡単に紹介しましょう。AS2まではframesLoadedプロパティを使って、特定のフレーム、特定のインスタンスが読み込まれたどうか判断して読み込み待ちを行いました。<br>
<br>
[:script:]最後まで読み込まれたらtopへ進む。それまではループする。
<pre class="brush: as3, first-line: 1">
if (this.framesLoaded == this.totalFrames) {
    gotoAndPlay("top");
}else{
   gotoAndPlay("loop");
}
</pre>
<br>
framesLoadedプロパティを使った方法はAS3でも使えますが、AS3からは次に示すようにloaderInfoのprogressイベントのリスナーになり、bytesLoadedとbytesTotalのプロパティを使うことでダウンロード量を調べることができます。<br>
<br>
[:script:]プログレスバーを表示するフレームアクション
<pre class="brush: as3, first-line: 1">
stop();
var bar:Sprite = new Sprite();
bar.graphics.beginFill(0x000000);
bar.graphics.drawRect(0,0,1,5);
bar.graphics.endFill();
bar.y=stage.stageHeight/2;
addChild(bar);
loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressHandler);
loaderInfo.addEventListener(Event.COMPLETE, completeHandler);

function progressHandler(eventObj:ProgressEvent):void {
	var per:Number = loaderInfo.bytesLoaded/loaderInfo.bytesTotal;
	bar.width = stage.stageWidth*per;
}
function completeHandler(eventObj:Event):void{
		removeChild(bar);
		loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressHandler);
		loaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
		gotoAndStop("top");
}
</pre>
→<a href="http://oshige.com/flash/as3note_cs4/sample/progress.html" target="new">swfを試す</a>。<br>
<small>１回実行するとブラウザにキャッシュされるので、２回目以降はプログレスバーが表示されない場合があります。</small><br>
<br>
これを見て外部jpegやswfを読み込むLoaderでの処理と同じと思った人も多いはず。そうです。LoaderのcontentLoaderInfoですね。contentLoaderInfoは読み込むコンテンツオブジェクトのloaderInfoの値なんですね。<br>
<br>]]>
        
    </content>
</entry>

<entry>
    <title>Adobe EDGE newsletter 第2回 2009.10</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/10/adobe-edge-newsletter-200910.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3864</id>

    <published>2009-10-29T01:58:52Z</published>
    <updated>2009-11-25T11:25:35Z</updated>

    <summary> Adobe EDGE newsletter第2回 『大重美幸のこれ見落としてま...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="情報、その他" scheme="http://www.sixapart.com/ns/types#category" />
    
        <category term="連載Adobe EDGE" scheme="http://www.sixapart.com/ns/types#category" />
    
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[<p><br />
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><img alt="image.jpg" src="http://oshige.com/flash/as3note_cs4/images/image.jpg" width="204" height="110" class="mt-image-none" style="" /></span></p>

<p>Adobe EDGE newsletter第2回<br />
<strong>『大重美幸のこれ見落としてませんか？ ActionScript 3.0』</strong><br />
『<a href="http://www.adobe.com/jp/newsletters/edge/october2009/articles/article2/index.html" target="adobe">外部 swf ファイルのシンボルを利用する</a>』が公開されました。</p>

<p><br />
ちなみに第１回「<a href="http://www.adobe.com/jp/newsletters/edge/september2009/articles/article1/" target="adobe">あなたが思う以上に自由自在な『Buttonコンポーネント』</a>」は先月の<a href="http://www.adobe.com/jp/newsletters/edge/october2009/articles/article4/index.html" target="adobe">2009年9月人気記事the Edge newsletter</a>でベスト１でした。まだ読んでない人は読んでくださいね。</p>

<p>評価基準は知らないんですけど(^ ^?</p>]]>
        
    </content>
</entry>

<entry>
    <title>フォントの英語名を調べる</title>
    <link rel="alternate" type="text/html" href="http://oshige.com/flash/as3note_cs4/2009/10/post-62.html" />
    <id>tag:oshige.com,2009:/flash/as3note_cs4//27.3847</id>

    <published>2009-10-19T04:37:42Z</published>
    <updated>2009-10-19T06:15:36Z</updated>

    <summary>フォントの英語名はどうすれば調べることができるでしょうか？ 実はけっこう簡単です...</summary>
    <author>
        <name>oshige</name>
        <uri>http://oshige.com</uri>
    </author>
    
        <category term="補足・追加原稿" scheme="http://www.sixapart.com/ns/types#category" />
    
    <category term="font" label="font" scheme="http://www.sixapart.com/ns/types#tag" />
    <category term="gettextformat" label="getTextFormat()" scheme="http://www.sixapart.com/ns/types#tag" />
    
    <content type="html" xml:lang="ja" xml:base="http://oshige.com/flash/as3note_cs4/">
        <![CDATA[フォントの英語名はどうすれば調べることができるでしょうか？<br>
実はけっこう簡単です。次のようにフォントを設定したテキストフィールドを選択した状態でコマンドメニューの[ActionScript用にフォント名をコピー]を実行します。あとはテキストエディタにペーストするだけです。<br>
こんなメニューがあったのか！と思った人もいるでしょうけど、あったんですね。(^ ^)/
<br><br>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://oshige.com/flash/as3note_cs4/images/fontname01.html" onclick="window.open('http://oshige.com/flash/as3note_cs4/images/fontname01.html','popup','width=580,height=183,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://oshige.com/flash/as3note_cs4/images/fontname01-thumb-240x75.jpg" width="240" height="75" alt="fontname01.jpg" class="mt-image-none" style="" /></a></span><br>
<small>フォントを指定しているテキストフィールドを選択する。</small>
<br>
<br>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://oshige.com/flash/as3note_cs4/images/fontname02.html" onclick="window.open('http://oshige.com/flash/as3note_cs4/images/fontname02.html','popup','width=362,height=347,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://oshige.com/flash/as3note_cs4/images/fontname02-thumb-240x230.jpg" width="240" height="230" alt="fontname02.jpg" class="mt-image-none" style="" /></a></span><br>
<small>[ActionScript用にフォント名をコピー]を実行。</small>
<br><br>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://oshige.com/flash/as3note_cs4/images/fontname03.html" onclick="window.open('http://oshige.com/flash/as3note_cs4/images/fontname03.html','popup','width=353,height=98,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://oshige.com/flash/as3note_cs4/images/fontname03-thumb-240x66.jpg" width="240" height="66" alt="fontname03.jpg" class="mt-image-none" style="" /></a></span><br>
<small>ペーストすると英語のフォント名が貼り付けられる。</small>
<br><br>
実はもっと簡単な方法のもあります。環境設定のテキストパネルで[フォント名を英語表記]をチェックします。するとフォント名はすべて英語で表示されます。ただし、先の方法のペースト結果をみるとわかるように、フォント名はスタイルメニューの値（W4など）と組み合わせる必要があります。<br>
<br>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://oshige.com/flash/as3note_cs4/images/fontname04.html" onclick="window.open('http://oshige.com/flash/as3note_cs4/images/fontname04.html','popup','width=898,height=711,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://oshige.com/flash/as3note_cs4/images/fontname04-thumb-240x190.jpg" width="240" height="190" alt="fontname04.jpg" class="mt-image-none" style="" /></a></span><br>
<small>環境設定のテキストパネルで[フォント名を英語表記]をチェックする。</small>
<br><br>
<span class="mt-enclosure mt-enclosure-image" style="display: inline;"><a href="http://oshige.com/flash/as3note_cs4/images/fontname05.html" onclick="window.open('http://oshige.com/flash/as3note_cs4/images/fontname05.html','popup','width=556,height=388,scrollbars=no,resizable=no,toolbar=no,directories=no,location=no,menubar=no,status=no,left=0,top=0'); return false"><img src="http://oshige.com/flash/as3note_cs4/images/fontname05-thumb-240x167.jpg" width="240" height="167" alt="fontname05.jpg" class="mt-image-none" style="" /></a></span><br>
<small>フォントメニューが英語のフォント名で表示される。</small>
<br><br>
スクリプトでテキストフィールドmyFldのフォント名を調べたい場合は、次のように実行します。ただし、myFldには何かテキストが入っている必要があります。<br>
<pre class="brush: as3, first-line: 1">
var tf:TextFormat = myFld.getTextFormat();
trace(tf.font); // Hiragino Maru Gothic Pro W4
</pre>]]>
        
    </content>
</entry>

</feed>
