マイミクの情報を取得
次はオーナーのマイミク情報を取得する例です。オーナーの情報と同様に、マイミクの情報も簡単に取得できます。
<?xml version="1.0" encoding="UTF-8"?>
<canvas proxied="false">
<include href="lz/textlistitem.lzx" />
<list id="lstPeople" y="10" width="100" height="200"/>
<view>
<view x="10">
<text resize="true" text="固有の値:"/>
<text id="txtID" x="130" resize ="true" fontstyle="bold"/>
</view>
<view x="10">
<text resize="true" text="名前:"/>
<text id="txtName" x="130" resize="true" fontstyle="bold"/>
</view>
<view x="10">
<text resize="true" text="ニックネーム:"/>
<text id="txtNickname" x="130" resize="true" fontstyle="bold"/>
</view>
<view x="10">
<text resize="true" text="サムネイル画像のURL:"/>
<text id="txtThumbnailURL" x="130" resize="true" fontstyle="bold"/>
</view>
<view x="10">
<text resize="true" text="プロフィール画面のURL:"/>
<text id="txtProfileURL" x="130" resize="true" fontstyle="bold"/>
</view>
<view x="10">
<text resize="true" text="年齢:"/>
<text id="txtAge" x="130" resize="true" fontstyle="bold"/>
</view>
<view x="10">
<text resize="true" text="誕生日:"/>
<text id="txtBirthDate" x="130" resize="true" fontstyle="bold"/>
</view>
<view x="10">
<text resize="true" text="住所:"/>
<text id="txtAddress" x="130" resize="true" fontstyle="bold"/>
</view>
<view x="10">
<text resize="true" text="血液型:"/>
<text id="txtBloodType" x="130" resize="true" fontstyle="bold"/>
</view>
<simplelayout axis="y" spacing="2" inset="10"/>
</view>
<simplelayout axis="x" spacing="2" inset="10"/>
<handler name ="onselect"
args ="p"
reference="lstPeople">
<![CDATA[
//リストボックスで選択したマイミクの情報を画面に表示する
var v_person = p.value;
txtID.setAttribute('text', v_person.id); //固有の値
txtName.setAttribute('text', v_person.name); //名前
txtNickname.setAttribute('text', v_person.nickname); //ニックネーム
txtThumbnailURL.setAttribute('text', v_person.thumbnailURL); //サムネイル画像のURL
txtProfileURL.setAttribute('text', v_person.profileURL); //プロフィール画面のURL
txtAge.setAttribute('text', v_person.age); //年齢
txtBirthDate.setAttribute('text', v_person.birthDate); //誕生日
txtAddress.setAttribute('text', v_person.address); //住所
txtBloodType.setAttribute('text', v_person.bloodType); //血液型
]]>
</handler>
<method name="init">
<![CDATA[
super.init();
#passthrough {
//flixiをインポートする
import flixi.*;
}#
//flixiオブジェクトの生成する
var v_flixi = new flixi.flixi();
//flixiPeopleEvent.GET_OWNERS_PEOPLEイベントのハンドラの作成
v_flixi.addEventListener(
flixi.flixiPeopleEvent.GET_OWNERS_PEOPLE,
function(p) {
for (var i=0, length=p.length; i<length; i++) {
var v_person = p.getItemByIndex(i);
//マイミクのニックネームをリストボックスにセット
lstPeople.addItem(v_person.nickname, v_person);
}
}
);
//オーナーのマイミク情報はflixiPeopleEvent.GET_OWNERS_PEOPLEイベントで取得する
v_flixi.getOwnersPeople();
]]>
</method>
</canvas>

