I am trying to read the html page that contains my SWF from inside the SWF itself.
This works:
function loadWebPage():void{
var url:String = “iFrame.html”;
var urlRequest:URLRequest = new URLRequest(url);
urlRequest.method = URLRequestMethod.GET;
var urlLoader:URLLoader = new URLLoader();
urlLoader.addEventListener(Event.COMPLETE, webPageLoaded);
urlLoader.load(urlRequest);
}
function webPageLoaded(event:Event):void{
var pageData:String = event.currentTarget.data;
trace(pageData);
}
However, I need to write “iFrame.html” as the URL. I know that the container webpage’s name is “iFrame.html.” But what if I don’t know the name of the HTML page?
instead of “iFrame.html” is there a “_self” or “_parent” or external interface call that I can pass into the urlLoader that will get me the container HTML page of the swf?