asfunction
Availability
Flash Player 5.
Usage
asfunction:function,"parameter"
Parameters
An identifier for a function.
function
A string that is passed to the function named in the
parameter
Returns
Nothing.
Description
Protocol; a special protocol for URLs in HTML text fields. In HTML text fields, text may be
hyperlinked using the HTML
for a standard protocol like HTTP, HTTPS, or FTP. The
protocol specific to Flash, which causes the link to invoke an ActionScript function.
Example
In this example, the
object
myTextField
inside the text field. The
function MyFunc(arg){
trace ("You clicked me! Argument was "+arg);
}
myTextField.htmlText ="<A HREF=\"asfunction:MyFunc,Foo \">Click Me!</A>";
When the hyperlink is clicked, the following results are displayed in the Output panel:
You clicked me!
Boolean class
Availability
Flash Player 5 (became a native object in Flash Player 6, which improved
performance significantly).
Description
The Boolean class is a wrapper object with the same functionality as the standard JavaScript
Boolean object. Use the Boolean class to retrieve the primitive data type or string representation
of a Boolean object.
You must use the constructor
its methods.
tag. The
A
HREF
function is defined in the first three lines of code. The TextField
MyFunc()
is associated with an HTML text field. The text "Click Me!" is a hyperlink
function is called when the user clicks on the hyperlink:
MyFunc()
Parameter was Foo
new Boolean()
function
attribute of the
tag contains a URL that may be
A
asfunction
to create a Boolean object before calling
parameter.
protocol is an additional
Boolean class
289
Need help?
Do you have a question about the FLASH MX 2004 - ACTIONSCRIPT and is the answer not in the manual?
Questions and answers