MovieClip.loadVariables( ) Method

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
MovieClip.loadVariables( ) Method Flash 5

retrieve an external set of variables
mc.loadVariables(url) mc.loadVariables(url, method)

Arguments

url

A string specifying the path to one of two variable sources: a script that produces variables as output, or a text file containing variables.

method

An optional string literal indicating the method by which to send the variables from mc to an external script. If specified, variables are both sent and loaded. If omitted, variables are loaded only. Must be either the literal "GET" or "POST"; no other expression is allowed.

Description

The MovieClip.loadVariables( ) method is an alternative to the global loadVariables( ) function. When invoked as a MovieClip method, loadVariables( ) takes no target parameter; it loads the variables at url into mc. The MovieClip method syntax is less prone to user error than its global function counterpart because no target parameter is required.

For usage instructions, see the global loadVariables( ) function. As of Flash 6, the LoadVars class is preferred over MovieClip.loadVariables( ), as it provides a more flexible and powerful means of importing and exporting variables.

See Also

loadVariables( ), the LoadVars class; Section 13.7

     
       About Safari   |   Terms of Service   |   Privacy Policy   |   Contact Us   |   Help   |   Submit a Problem
    Copyright 2002 O'Reilly & Associates, Inc. All rights reserved.
    1005 Gravenstein Highway North
    Sebastopol, CA 95472
     


    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net