![MACROMEDIA FLASH MX 2004 - ACTIONSCRIPT Reference Manual Download Page 289](http://html1.mh-extra.com/html/macromedia/flash-mx-2004-actionscript/flash-mx-2004-actionscript_reference-manual_3378897289.webp)
Boolean class
289
asfunction
Availability
Flash Player 5.
Usage
asfunction:function,"parameter"
Parameters
function
An identifier for a function.
parameter
A string that is passed to the function named in the
function
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
A
tag. The
HREF
attribute of the
A
tag contains a URL that may be
for a standard protocol like HTTP, HTTPS, or FTP. The
asfunction
protocol is an additional
protocol specific to Flash, which causes the link to invoke an ActionScript function.
Example
In this example, the
MyFunc()
function is defined in the first three lines of code. The TextField
object
myTextField
is associated with an HTML text field. The text "Click Me!" is a hyperlink
inside the text field. The
MyFunc()
function is called when the user clicks on the hyperlink:
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! Parameter was Foo
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
new Boolean()
to create a Boolean object before calling
its methods.
Summary of Contents for FLASH MX 2004 - ACTIONSCRIPT
Page 1: ...ActionScript Reference Guide...
Page 8: ...8 Contents...
Page 12: ......
Page 24: ...24 Chapter 1 What s New in Flash MX 2004 ActionScript...
Page 54: ...54 Chapter 2 ActionScript Basics...
Page 80: ...80 Chapter 3 Writing and Debugging Scripts...
Page 82: ......
Page 110: ...110 Chapter 5 Creating Interaction with ActionScript...
Page 112: ......
Page 120: ...120 Chapter 6 Using the Built In Classes...
Page 176: ......
Page 192: ...192 Chapter 10 Working with External Data...
Page 202: ...202 Chapter 11 Working with External Media...
Page 204: ......
Page 782: ...782 Chapter 12 ActionScript Dictionary...
Page 793: ...Other keys 793 221 222 Key Key code...
Page 794: ...794 Appendix C Keyboard Keys and Key Code Values...
Page 798: ...798 Appendix D Writing Scripts for Earlier Versions of Flash Player...
Page 806: ...806 Appendix E Object Oriented Programming with ActionScript 1...
Page 816: ...816 Index...