外部XMLのテキスト表示 WinXP、FLASH MX2004Proで編集しています。 FLASHで外部XMLを読み込んで、テキストを表示させたいと思っています。 XMLファイルはnews.xmlで、 -------------------- <?xml version="1.0" encoding="Shift_JIS" ?> <news> <item> <title>NEWSその1</title> <link>http://www.news01.com</link> </item> <item> <title>NEWSその1</title> <link>http://www.news02.com</link> </item> </news> </xml> -------------------- です。DWで作成したので、Shift-Jisで間違いないと思います。 FLASHでは、ステ
This page is a blog to which my 3DCG artwork, design, flash actionscript, web programming,and my hobby work etc. are updated when the nature turns. We are both alive in the beautiful earth. 前回のAS3でXML読み込みから、読み込んだだけじゃなにもならないので よく企業ページなどで見かけるスクロールバナーのFLashを外部読み込みXMLで作りました。バリューコマースとかUnited arowsとか バナー画像をjpg,pngなどで準備して、そのファイル名とリンク先URLをXMLで記入すれば使えます。 PHPなどのサーバーサイド技術と連携すれば、管理画面でバナー登録してFLASHの更新などができるようにな
ActionScriptでXML形式のファイルを読み込んで利用する際に,ぜひ知っておきたいのが「XPathAPIクラス」です。XPathAPIクラスを利用することで,目的のデータに簡単にアクセスできるようになります。 XMLファイルのデータを抽出 図1はXMLデータの中から,指定したものだけを抽出して表示するムービーです。このムービーで読み込んでいるXMLファイルは,図2のようなファイルです。 図1:XMLデータを抽出するムービー(クリックするとムービーを表示します) (サンプル・ファイルのダウンロードはこちら) 図2:読み込んでいるXMLファイル(クリックすると拡大表示します) このようにXMLファイルから指定したデータを取り出したい場合には,「XPathAPIクラス」が便利です。 XPath式を使って目的のデータを指定する 図3は前回も読み込み用に使用したXMLファイルです。このXML
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く