Example
The following ActionScript creates a new movie clip instance and opens the Macromedia website
in a new browser window:
this.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.getURL("http://www.macromedia.com", "_blank");
The
method also allows you to send variables to a remove server-side script, as seen in
getURL()
the following code:
this.createEmptyMovieClip("loader_mc", this.getNextHighestDepth());
loader_mc.username = "some user input";
loader_mc.password = "random string";
loader_mc.getURL("http://www.flash-mx.com/mm/viewscope.cfm", "_blank", "GET");
See also
getURL(), LoadVars.sendAndLoad(),
MovieClip.globalToLocal()
Availability
Flash Player 5.
Usage
my_mc.globalToLocal(point:Object) : Void
Parameters
The name or identifier of an object created with the generic
point
specifies the x and y coordinates as properties.
Returns
Nothing.
Description
Method; converts the
(local) coordinates.
You can extend the methods and event handlers of the MovieClip class by creating a subclass.
Example
Add the following ActionScript to a FLA or AS file in the same directory as an image called
photo1.jpg:
this.createTextField("coords_txt", this.getNextHighestDepth(), 10, 10, 100,
22);
coords_txt.html = true;
coords_txt.multiline = true;
coords_txt.autoSize = true;
this.createEmptyMovieClip("target_mc", this.getNextHighestDepth());
target_mc._x = 100;
target_mc._y = 100;
target_mc.loadMovie("photo1.jpg");
LoadVars.send()
object from Stage (global) coordinates to the movie clip's
point
Object
class. The object
MovieClip.globalToLocal()
583
Need help?
Do you have a question about the FLEX-FLEX ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers