OK, I have noticed that there are two different issues here.
I talked to one of my contacts and he said that he was able to see the ads on his computer, which made me curious. I checked on IE and I was able to see it. (Although it did not center properly, but that is a different issue.) I checked on Netscape on my laptop, but it did not work; it did work on my laptop's IE. It worked on IE and Firefox on my roommate's laptop. This leads me to believe that part of the problem may be from the Flashblock that I installed on both of my computers. (Or perhaps NoScript is doing it.)
Then we get to the second problem. I found out that it would not properly center with the MovieClip.loadMovie(); method because when it attempted to load the SWF, MovieClip.getBytesLoaded() and MovieClip.getBytesTotal() would return undefined when the SWF finished loading when the application was viewed in a browser. (And thusly it would not call the next function that did the centering. This problem does not happen in the Flash IDE testing environment.) I switched to the MovieClipLoader() constructor since it has an error reporting function and onLoadComplete() method which should bypass that silly little getBytesLoaded() undefined problem. Sadly, this method will not even load the movie outside of the Flash IDE. Out of sheer frustration, I will place the code below...
Code:
#initclip
Advertisement.prototype = new MovieClip();
function Advertisement() {
this.init();
}
Advertisement.prototype.init = function() {
this.defaultAd_mc._visible = false;
};
Advertisement.prototype.setVars = function(a, u) {
if (u == null || u == "default") {
this.URL = "http://www.septimusprime.com/";
} else if (u == "none") {
this.URL = null;
} else {
this.URL = u;
}
if (a == null || a == "default") {
this.defaultAd_mc._visible = true;
this.activateButton();
} else {
this.pic = a;
var picSplit:Array = this.pic.split('.');
this.picType = picSplit[picSplit.length-1];
this.createEmptyMovieClip("pic_mc",this.getNextHighestDepth());
var mclListener:Object = new Object();
mclListener.onLoadStart = function(target_mc:MovieClip) {
//target_mc._visible = false;
target_mc._parent.status_txt.htmlText = "<p>Starting load for "+target_mc+".</p><p>Target URL ="+target_mc._url+".</p>";
};
mclListener.onLoadProgress = function(target:MovieClip, bytesLoaded:Number, bytesTotal:Number):Void {
target_mc._parent.status_txt.htmlText += "<p>"+bytesLoaded+" bytes of "+bytesTotal+"</p>";
};
mclListener.onLoadComplete = function(target_mc:MovieClip) {
target_mc._parent.checkLoad();
target_mc._parent.status_txt.htmlText += "<p>Finishing load for "+target_mc+"</p><p>Target URL ="+target_mc._url+".</p>";
};
mclListener.onLoadError = function(target_mc:MovieClip, errorCode:String, httpStatus:Number) {
target_mc._parent.status_txt.htmlText += "<p>Error loading for "+target_mc+"</p><p>Error code '"+errorCode+"': http Status ="+httpStatus+".</p><p>URL: "+target_mc._parent.pic+"</p>";
};
var pic_mcl:MovieClipLoader = new MovieClipLoader();
pic_mcl.addListener(mclListener);
pic_mcl.loadClip(this.pic,this.pic_mc);
}
};
Advertisement.prototype.checkLoad = function() {
//this.pic_mc.setMask(this.ma_mc);
this.centerPic();
this.finishLoad = true;
this._parent._parent.reportLoad();
this.activateButton();
};
Advertisement.prototype.centerPic = function() {
if (this.intervalCounter != undefined) {
clearInterval(this.intervalCounter);
}
if (this.picType != 'swf') {
if (this.pic_mc._width>this.back_mc._width) {
this.pic_mc._width = this.back_mc._width;
}
if (this.pic_mc._height>this.back_mc._height) {
this.pic_mc._height = this.back_mc._height;
}
this.pic_mc._x = (this.pic_mc._width/-2);
this.pic_mc._y = (this.pic_mc._height/-2);
} else {
this.pic_mc._x = this.back_mc._x;
this.pic_mc._y = this.back_mc._y;
}
if (this.pic_mc._x == 0 || this.pic_mc._y == 0) {
this.intervalCounter = setInterval(this, "centerPic", 500);
} else {
//this.pic_mc._visible = true;
}
};
Advertisement.prototype.activateButton = function() {
if (this.URL.length>0 && this.URL != null && this.URL != "none") {
this.back_mc.onRelease = function() {
getURL(this._parent.URL, "_self");
};
}
};
Object.registerClass("Advertisement",Advertisement);
#endinitclip
Let it be known that I jumped from Flash MX to Flash CS3, so a few things annoy and bedevil me, like not being able to use -1 to target the last item in an array. (Every time I tried to do "this.picType = picSplit[-1];" it would result in "undefined".) Also, I am none too happy about these case-sensitive variable shenanigans they threw in there as well.
If you wish to see this in action, here is a link to the small demo that I made. Any help would be appreciated.
(P.S. And after this is resolved, can someone please explain to me why exactly I should switch to ActionScript 3.0 other than masochism?)