Подскажите плиз что я не так делаю.

Код AS3:
ExternalInterface.call("alert", ExternalInterface.call("window.location.toString()"));
Выводит алерт:
undefined
Сразу подумал что не хочет работать локально, но попробывав сделать на html, всё сработало:

PHP код:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script>
function getLocation() {
alert(window.location.toString());
}
</script>
</head>
<body>
<script>
getLocation();
</script>
</body>
</html>
выдаёт:
file://localhost/C:/Users/Hustler/Desktop/Untitled-1.html
Что же я делаю не так?
Спасибо.