dylanscott
dylanscott

Reputation: 1

Get the content of title tag from a webpage through .swf file

I need to call the title tag from a web page using a flash banner. I want to use the title tag as the content for the banner.

I am looking into flash.external.ExternalInterface.call, but am struggling with how to call getElementsbyTagName through this.

Any help would be appreciated.

Thanks.

Upvotes: 0

Views: 37

Answers (1)

BadFeelingAboutThis
BadFeelingAboutThis

Reputation: 14406

There is no need to use getElementsByTag or getElementById, you can just use document.title.

This should do the trick:

if(ExternalInterface.available){
    var title:String = ExternalInterface.call("document.title");
}

Upvotes: 2

Related Questions