how to access maintimeline functions and variables from a nested movieclip in as3

This is the biggest problem for actionscript coders those who migrate from actionscript 2.0 and actionscript 1.0 to actionscript 3.0. In as1,as2 we can access the main timeline functions and variables from a nested movieclips just using _root.varName or _root.functionName, But in as3 we cant access the maintimline variables and functions this way.following is a sample code to access the maintimeline variable and functions from a nested movieclip.

MovieClip(root).functionName();
Or
MovieClip(root).varName


PHP developer Cochin |PHP developer Kerala | PHP developer India | Flash developer/programmer Cochin | Flash developer/programmer Kerala | Flash developer/programmer India | web programmer kerala |web programmer Cochin |web programmer India |web developer kerala |Web developer Cochin | Kerala PHP | PHP freelancer| flash actionscript freelancer