Hello all, I would like to apologise in advance for my inability to put my problem into words, I always s*ck at that :bored:.
Here goes.
I (like many othes probably) am using a master flash movie (AS2) with a menu that loads external swf files into a container. It is working pretty well, but I’m running into a pretty nasty problem.
This particular external swf that I am loading has a menu made of images that scroll depending on the mouseposition. It is very similar to this:
http://www.flashcomponents.net/upload/samples/519/index.html
Now, when running the swf on its own (not inside the master movie) it works 100%. BUT… seeing as I am going to load this into a master movie that is bigger (about 300px of menus to the left) I get problems with the positioning. I don’t really know what the cause is but the imagemenu seems to think it has a bigger stage now and the images seem to fall behind my master-menu.
I have to find a way to restrict either the positioning of the images, or the mousemovement.
I tried fixing this by adding a square, the exact size of the external swf’s dimensions. hit_mc
hit_mc.onMouseMove = function() {
if (!hit_mc.hitTest(_root._xmouse, _root._ymouse, true) || w<=hit_mc._width) {
return;
}
// end if
var _loc2 = _root._xmouse<64 ? (64) : (_root._xmouse>hit_mc._width-64 ? (hit_mc._width-64) : (_root._xmouse));
_loc2 = _loc2-64;
var _loc4 = hit_mc._width-w;
var _loc3 = Math.floor(_loc2*_loc4/(hit_mc._width-128));
container_mc.goTo(_loc3,0);
};
MovieClip.prototype.goTo = function (xpos, ypos)
{
if (this.onEnterFrame != undefined)
{
delete this.onEnterFrame;
} // end if
var xdone = false;
var ydone = false;
this.onEnterFrame = function ()
{
if (Math.abs(ypos - this._y) > 5.000000E-001)
{
this._y = this._y + (ypos - this._y) / 9;
}
else
{
ydone = true;
} // end else if
if (Math.abs(xpos - this._x) > 5.000000E-001)
{
this._x = this._x + (xpos - this._x) / 9;
}
else
{
xdone = true;
} // end else if
if (xdone && ydone)
{
delete this.onEnterFrame;
this._x = xpos;
this._y = ypos;
this.onGoFinish();
} // end if
};
};
Any help would be grately appreciated.