First, the XML-formatted data is created, using the values that the user inputs in the SWF file,
and that XML object is sent using the
function, the
loadVariables()
doesn't wait for results before being returned) and loads into the
When the data arrives, the
define the
loginReplyXML
can process the
loginreply
This function must always be on the frame that contains the ActionScript for the login
button.
If the login is successful, the SWF file progresses to the
successful, then the playhead moves to the
a condition and case statement. For more information on case and break statements, see
case statement and break statement in the ActionScript 2.0 Language Reference. For
more information on conditions, see if statement and else statement in the
ActionScript 2.0 Language Reference.
This design is only an example, and Macromedia can make no claims about the level of
security it provides. If you are implementing a secure password-protected system, make
sure you have a good understanding of network security.
For more information, see Integrating XML and Flash in a Web Application at
www.macromedia.com/support/flash/interactivity/xml/
ActionScript 2.0 Language Reference. For more information on local file security, see
local file security and Flash Player" on page
You can find a sample source file, login.fla, in the Samples folder on your hard disk. This
sample shows how to add simple login functionality to your websites using ActionScript 2.0.
The sample uses ActionScript and components to create a small form in which you enter a
user name and password and then click a button to enter a site.
In Windows, browse to boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript\Login.
On the Macintosh, browse to Macintosh HD/Applications/Macromedia Flash 8/Samples
and Tutorials/Samples/ActionScript/Login.
Flash Player 8 introduced the
class, and MovieClipLoader class to allow users to access the status code from an HTTP
request. This allows developers to determine why a particular load operation may have failed
instead of only being able to determine that a load operation already has failed.
658
Working with External Data
sendAndLoad
XML element arrives asynchronously (that is, it
loginreply
handler of the
onLoad
function, which is called when the
element.
loginfailure
679.
event handler for the XML class, LoadVars
onHTTPStatus
method. Similar to data from a
loginReplyXML
object is called. You must
loginReplyXML
handler triggers, so it
onLoad
frame label. If the login is not
welcome
frame label. This is processed using
and the XML entry in the
object.
"About
Need help?
Do you have a question about the FLASH 8-LEARNING ACTIONSCRIPT 2.0 IN FLASH and is the answer not in the manual?