EasyManua.ls Logo

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE - Url (Textfield._Url Property); Variable (Textfield.variable Property)

MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE
780 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
TextField 689
_url (TextField._url property)
public _url : String [read-only]
Retrieves the URL of the SWF file that created the text field.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example retrieves the URL of the SWF file that created the text field, and a
SWF file that loads into it.
this.createTextField("my_txt", 1, 10, 10, 100, 22);
trace(my_txt._url);
var mclListener:Object = new Object();
mclListener.onLoadInit = function(target_mc:MovieClip) {
trace(target_mc._url);
};
var holder_mcl:MovieClipLoader = new MovieClipLoader();
holder_mcl.addListener(mclListener);
holder_mcl.loadClip("best_flash_ever.swf",
this.createEmptyMovieClip("holder_mc", 2));
When you test this example, the URL of the SWF file you are testing, and the file called
best_flash_ever.swf are displayed in the Output panel.When you test this example, the URL
of the SWF file you are testing, and the file called best_flash_ever.swf write to the log file.
variable (TextField.variable property)
public variable : String
The name of the variable that the text field is associated with. The type of this property is
String.
Availability: ActionScript 1.0; Flash Lite 2.0
Example
The following example creates a text field called
my_txt and associates the variable
today_date with the text field. When you change the variable today_date, then the text that
appears in
my_txt updates.
this.createTextField("my_txt", 1, 10, 10, 200, 22);
my_txt.variable = "today_date";
var today_date:Date = new Date();
var date_interval:Number = setInterval(updateDate, 500);
function updateDate():Void {
today_date = new Date();
}

Table of Contents

Related product manuals