
-----------------------------------
Martin
Wed Mar 03, 2004 12:25 am

_root
-----------------------------------
Can someone explain what _root points to, and why I'd use it?

-----------------------------------
zylum
Wed Mar 03, 2004 11:29 pm


-----------------------------------
_root refers to the main movie. the main movie in essence is a movie clip and its instance name is '_root'. you could treat _root as you would any other movie clip such as its position (_x,_y), whether it's visible or not, its width and height... a usefull application would be if you wanted to make your whole movie fade in you would do something like this:


_root._alpha = 0
_root.onEnterFrame = function() {
	this._alpha += 1
}


this would be alot easier than doing the same thing to all your movieclips in your movie... 

-zylum
