Button._url
Availability
Flash Player 6.
Usage
.
my_btn
_url:String
Description
Read-only property; retrieves the URL of the SWF file that created the button.
Example
Create two button instances on the Stage called
ActionScript in Frame 1 of the Timeline:
var one_btn:Button;
var two_btn:Button;
this.createTextField("output_txt", 999, 0, 0, 100, 22);
output_txt.autoSize = true;
one_btn.onRelease = function() {
trace("clicked one_btn");
trace(this._url);
};
two_btn.onRelease = function() {
trace("clicked "+this._name);
var url_array:Array = this._url.split("/");
var my_str:String = String(url_array.pop());
output_txt.text = unescape(my_str);
};
When you click each button, the file name of the SWF containing the buttons displays in the
Output panel.
and
one_btn
two_btn
. Enter the following
Button._url
163
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers