public _url : String [read-only]

Retrieves the URL of the SWF file that created the button.

*Availability: *ActionScript 1.0; Flash Player 6
Example

Create two button instances on the Stage called one_btn and two_btn. Enter
the following 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);
};



On 5/3/07, Michael Mudge <[EMAIL PROTECTED]> wrote:

Is there any way to determine which web page is displaying my SWF?  This
could be the referrer field of the HTTP request for the .SWF... Or any
other data that might indicate what the containing web page is.  I am
using this to determine how to match the theme of the source page, not
for security.

- Kipp

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com




--
--
Leandro Amano
Digital Bug
Chief Creative Officer
Adobe Certified Expert
Adobe Certified Instructor
Adobe User Group Leader
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to