Accessing external swf variables or functions
LevelData is a class in the .swf, not a variable in the class you are accessing (Main). Luckily, the function you are trying to call is a public static function, which means you can call it with LevelData.unlockPage. The loader doesn't know this class yet, so we'll have to tell it where to find the class.

Here you go:

Press 1 in the menu screen to unlock all levels.