Hello,
So I am trying to get this banner to work and for some reason it only works in IE6. I have only tried in IE6, IE7 and FF2.
You can check out the page at this URL:
page
also you can have a look at the XML file that i’m using to get the info
XML File
This is the actionscript code I am using.
//Set amount of time to hold each image onscreen
var inSeconds:Number = 7;
var xmlBanners:XML = new XML();
xmlBanners.ignoreWhite = true;
xmlBanners.onLoad = function(success) {
if (success) {
parseXML(xmlBanners);
}
};
xmlBanners.load("_lib/banners.xml");
function parseXML(banners_XML) {
var bannerNum:Number = 0;
var xnRoot:XMLNode = banners_XML.firstChild;
var xnBanner:XMLNode;
xnBanner = xnRoot.childNodes[bannerNum];
myFile = xnBanner.firstChild.firstChild;
//trace(myFile);
myURL = xnBanner.lastChild.firstChild;
//trace(myURL);
this.onEnterFrame = function() {
//This creates the first clip without delay
this.createEmptyMovieClip("my_mc", this.getNextHighestDepth());
var movLoad:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myListener.onLoadInit = function(thisMc:MovieClip) {
thisMc.onRelease = function() {
getURL(myURL);
};
};
movLoad.addListener(myListener);
movLoad.loadClip("gfx/banners/"+myFile, this.my_mc);
delete this.onEnterFrame;
};
//After that, they are on a timed change
this.getNewPic = function() {
var maxBanners:Number = xnRoot.childNodes.length;
if (bannerNum == maxBanners-1) {
bannerNum = 0;
}
else {
bannerNum++;
}
xnBanner = xnRoot.childNodes[bannerNum];
myFile = xnBanner.firstChild.firstChild;
myURL = xnBanner.lastChild.firstChild;
//
this.createEmptyMovieClip("my_mc", this.getNextHighestDepth());
var movLoad:MovieClipLoader = new MovieClipLoader();
var myListener:Object = new Object();
myListener.onLoadInit = function(thisMc:MovieClip) {
thisMc.onRelease = function() {
getURL(myURL);
};
};
movLoad.addListener(myListener);
movLoad.loadClip("gfx/banners/"+myFile, this.my_mc);
};
var myInt = setInterval(this, "getNewPic", (inSeconds*1000));
}
I have used both dreamweavers flash display javascript code and swfobject code. But it doesn’t make a difference.
Can anyone help me out pls ?