Im using a image viewer code from this forum, I think it´s Scotty that has put it together (thanks!). The problem I have is when I load this .swf into my main movie using MCL it just stops working. Anyone have an idea on this? Here’s the code and I also attach my .fla
// how many nav buttons
var picNum:Number = 5;
// start
containerMC._alpha = 0;
btn1.alphaTo(100, .5)
btn1.enabled = false;
// navigation
for (var i = 1; i<=picNum; i++) {
_root["btn"+i].topText_mc.text = *;
}
// buttons
function hitButton(nbrID) {
btn = _root["btn"+nbrID];
btn.nbrID = nbrID;
btn.onRollOver = function() {
this.alphaTo(100, .5);
}
btn.onRollOut = function() {
this.alphaTo(30, .5);
}
btn.onRelease = function() {
_root.containerMC.loadPic("images/"+nbrID+".jpg");
btn1._alpha = 30;
btn1.enabled = true;
for (var i = 2; i<15; i++) {
_root["btn"+i]._alpha = 30;
_root["btn"+i].enabled = true;
this._alpha = 100;
this.enabled = false;
}
}
}
for (var i = 1; i<15; i++) {
_root.hitButton(i);
}
// view images
MovieClip.prototype.loadPic = function(pic){
containerMC._alpha = 0;
this.loadMovie(pic);
_root.onEnterFrame = function(){
var t = containerMC.getBytesTotal(), l = containerMC.getBytesLoaded();
if (t != 0 && Math.round(l/t) == 1&&containerMC._width>0){
var w = containerMC._width + 2, h = containerMC._height + 2;
bg_mc.resizeMe(w, h);
delete _root.onEnterFrame;
}
}
}
MovieClip.prototype.resizeMe = function(w, h) {
var speed = 3;
this.onEnterFrame = function() {
this._width += (w-this._width)/speed;
this._height += (h-this._height)/speed;
if (Math.abs(this._width-w)<1) {
this._width = w;
this._height = h;
containerMC._x = border._x-containerMC._width;
containerMC._y = border._y-containerMC._height/2;
_root.containerMC._alpha += 9;
if (_root.containerMC._alpha>90) {
_root.containerMC._alpha = 100;
delete this.onEnterFrame;
}
}
}
}
containerMC.loadPic ("images/1.jpg");