URL からテキストをロードし、テキストを分解して、結果を変数に保存しようとしています。AS2 アクションスクリプトは次のようになります。
// Create the empty variables
var user_title = '';
var user_message = '';
var user_author = '';
// Load the string
var loadText = new LoadVars();
loadText.load("http://www.example.com/html_feed.php?md5=15d89cac6e77c8e3a592c05aee13bcb7");
// Save values to variables
loadText.onLoad = function(success) {
if (success) {
user_title = this.thetitle;
user_message = this.theMessage;
user_author = this.theAuthor;
}
};
取得しようとしているページは次のようになります。
thetitle=Greetings&theMessage=Hello everyone!&theAuthor=Steve
user_title
変数をトレースするuser_message
と、user_author
空白の出力が得られます。これonLoad
により、スクリプトの一部が機能していない可能性があります。
任意のポインタは非常に高く評価されます。AS2 および CS5 上の Flash Player 10。