Hello Guys and girls,
Thanks for the extremely useful information you have all contributed, I am fairly new to flash and even moreso to AS. I am working with V3 gallery - I have a container box that sizes to the photo. I currently have the text below the photo and it moves according to the size of the image, I would like to place a title above the image which also adjusts to the size of the image,… the code is as shown below and the MC that I would like above the image is testbox Thanks for any help!
Mark\\
var tnNr;
spacing = 10;
container._alpha = 0;
var curLength;
MovieClip.prototype.loadPic = function(pic, id) {
info.test.htmlText = “”
info.desc_txt.text =""
testbox.test.text =""
info.client.text =""
info.date.text = “”
info.technology.text = “”
this._alpha = 0;
this.loadMovie(pic);
temp = this._parent.createEmptyMovieClip(“temp2”, 998);
temp.onEnterFrame = function() {
var t = container.getBytesTotal(), l = container.getBytesLoaded();
if (Math.round(l/t) == 1 && container._width != 0 && container._height != 0) {
var w = container._width+spacing, h = container._height+spacing;
border.resizeMe(w, h, id);
delete this.onEnterFrame;
}
};
};
MovieClip.prototype.resizeMe = function(w, h, id) {
var speed = 3;
container._alpha = 0;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1 && Math.abs(this._height-h)<1) {
this._width = w;
this._height = h;
container._x = this._x-this._width/2+spacing/2;
container._y = this._y-this._height/2+spacing/2;
info._y = Math.round(this._y+this._height/2+spacing/2);
testbox._y = Math.round(this._y+this._height/2+spacing/2);
container._alpha += 5;
if (container._alpha>90) {
web_url = uArray[Number(id)]
web_title = “Buy Now”;
web_txt.html = true;
info.test.htmlText = “<a href=”"+web_url+"">"+web_title+"</a>";
testbox.test.text = xArray[Number(id)]
info.desc_txt.text = iArray[Number(id)]
info.client.text = cArray[Number(id)]
info.date.text = dArray[Number(id)]
info.technology.text = itArray[Number(id)]
container._alpha = 100;
delete this.onEnterFrame;
}
}
};
};