Kenan
Kenan

Reputation: 1795

How to create flash banner which loads content from external XML?

I want to create banner and do exchange with others. Banner will be flash because it will load just entry titles with URL's from XML, which is on my site.

Is this possible at all?
Could someone point me to some tutorial or give me some tips?

Thanks in advance

Upvotes: 0

Views: 1105

Answers (1)

Jason Rowe
Jason Rowe

Reputation: 6276

You could use ActionScript to load the XML from the other sites.

When getting data via ActionScript you can use the async URLLoader or use a JavaScript function via the synchronous ExternalInterface.call. You can find information about both methods at www.actionscript.org.

URLLoader Example

var loader:URLLoader = new URLLoader();
loader.addEventListener( IOErrorEvent.IO_ERROR, this.ioError );
loader.addEventListener( Event.COMPLETE, xmlLoaded );

var request:URLRequest = new URLRequest(file);
loader.load(request);

ExternalInterface Example

if (ExternalInterface.available)
return ExternalInterface.call(jsFunctionName, optionalArgs);

Upvotes: 1

Related Questions