Lockroot (Movieclip._Lockroot Property) - MACROMEDIA FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE Reference

Flash lite 2.x actionscript language reference
Hide thumbs Also See for FLASH 8-FLASH LITE 2.X ACTIONSCRIPT LANGUAGE:
Table of Contents

Advertisement

Parameters
- The name or identifier of an object created with the Object class, specifying the
pt:Object
x and y coordinates as properties.
Example
The following example converts x and y coordinates of the
(local) coordinates to the Stage (global) coordinates. The center point of the movie clip is
reflected after you click and drag the instance.
this.createTextField("point_txt", this.getNextHighestDepth(), 0, 0, 100,
22);
var mouseListener:Object = new Object();
mouseListener.onMouseMove = function() {
var point:Object = {x:my_mc._width/2, y:my_mc._height/2};
my_mc.localToGlobal(point);
point_txt.text = "x:"+point.x+", y:"+point.y;
};
Mouse.addListener(mouseListener);
my_mc.onPress = function() {
this.startDrag();
};
my_mc.onRelease = function() {
this.stopDrag();
};
See also
globalToLocal (MovieClip.globalToLocal method)

_lockroot (MovieClip._lockroot property)

public _lockroot :
A Boolean value that specifies what
clip. The
_lockroot
SWF file that is being loaded or in the handler that is loading the movie clip.
For example, suppose you have a document called Games.fla that lets a user choose a game to
play, and loads the game (for example, Chess.swf ) into the
that, after being loaded into Games.swf, any use of
Chess.swf (not
_root
Player 7 or later, you can add this statement to Chess.fla on the main Timeline:
this._lockroot = true;
Boolean
_root
property is
undefined
in Games.swf ). If you have access to Chess.fla and publish it to Flash
my_mc
refers to when a SWF file is loaded into a movie
by default. You can set this property within the
game_mc
in Chess.swf will refer to
_root
object, from the movie clip's
movie clip. Make sure
_root
MovieClip
in
489

Advertisement

Table of Contents
loading

Table of Contents