宇宙に思いを馳せている、なっくるです。
日食!日食!

今回もprogression、commandの話。latestDataについて。

前回の記事にあるように、new LoadURL( ) で読み込んだデータは、次の new Func( ) の中で this.latestData で取り出す事が出来ます。
自分で作ったcommandも次のcommandで取り出したいって時の話。

自分で作ったcommandで、latestDataにつめてあげれば言いだけなんですが。こんな感じ↓

......
new SerialList( null,
 new ImgList(),
 new Func( function():void {
  var imgURLList:Array = this.latestData.imgURLList as Array;
  var imgURLList:Array = this.latestData.linkList as Array;
 })
);

ImgList.as

public class MemoAllList extends SerialList {
 public function ImgList(initObject:Object = null ) {
  super( initObject );
  _imgURLList = [];
  _linkList = [];
  addCommand(
   ...... XML読んだりして _imgURLList に入れてあげる
   new Func( function ():void {
    this.parent.latestData ={
     imgURLList: _imgURLList,
     linkList: _linkList
    };
   })
  );
 }
......
}

HTML5飯