Depends on what that other class is. If it is a child Sprite, it can use
root. Otherwise, you could put a static reference on Main.
public class Main extends Sprite
public var mappa:Genera_mappa;
public var asd:Number=1;
public function Main()
mappa = new Genera_mappa();
exscuse me, but I didn't understand If I would access from mappa:Genera_mappa class to asd variable ( public var asd:Number=1;) how can I do?
Could you make me an exemple please?
TypeError: Error #1009: Can not access a property or method of a null object reference.root is = null , is it normal?the error is made by " trace(Main(root).asd); "Arghg,,,,, I locked for this error, I'm moving the project from mxml to actionscript.... Before I accessed with Application.application, now I can't..
It will be if you ask before it is added as a child.