Url (Button._Url Property) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Example
The following example demonstrates how to track two buttons as a menu. Place two button
instances on the Stage called
Timeline:
var one_btn:Button;
var two_btn:Button;
one_btn.trackAsMenu = true;
two_btn.trackAsMenu = true
one_btn.onRelease = function() {
trace("clicked one_btn");
};
two_btn.onRelease = function() {
trace("clicked two_btn");
};
Test the SWF file by clicking the Stage over
releasing it over
two_btn
contain
trackAsMenu
See also
trackAsMenu (MovieClip.trackAsMenu property)

_url (Button._url property)

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
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("/");
374
ActionScript classes
and
one_btn
two_btn
. Then try commenting out the two lines of ActionScript that
and test the SWF file again to see the difference in button behavior.
. Enter the following ActionScript in the
, holding the mouse button down and
one_btn
and
one_btn
two_btn
. Enter the following

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF