Hello around:}
I need some help about action script code of a button
I’ve an old on (release) command, and i would like to go with AS2 now. But I can’t succeed in making this work out with the btn.onRelease= fonction(); command.
I’ve a [color=Blue]stylesheet [/color]([color=SeaGreen]stylesheet.css[/color]), a dynamic variable [color=Blue]pageGalleryHTML[/color] from a .txt file ([color=SeaGreen]multimedia.txt[/color]).
The content field is nammed [color=DarkOrange]TextBox[/color], Here is my current button code:
on (release) {
var myCSS = new TextField.StyleSheet();
var cssURL = "stylesheet.css";
myCSS.load(cssURL);
myloadVarsText = new LoadVars();
myloadVarsText.load("multimedia.txt");
myloadVarsText.onLoad = function(success) {
if (success) {
TextBox.styleSheet = myCSS;
TextBox.html = true;
TextBox.htmlText = this.pageGalleryHTML;
} else {
trace("not loaded");
}
};
}
Please help me(-: