hello pepps!.. i really need your help in this, my client is getting really anxious about it and im loosing my mind!
im performing a interative view module for an appartment and im using the tutorial : http://www.kirupa.com/developer/flash8/interactive_image_pan.htm … the thing is that this intractive panning swf is being loaded into a main swf, but for the panning movement is using the as Stage.width the main swf size so its not working properly at all … IS THERE A WAY I CAN MAKE THE PANNING MOVEMENT RELATIVE TO THE SPECIFIC SWF???
HERE IS A LITTLE MORE INFORMATION
-html holding main swf file
- main swf (hmita-u306.swf) loads in a container mc [after clicking in the menu] :
- hallway-360.swf
- kitchen-360.swf
- mainbedroom-360.swf
- …
also you can take a look in here : http://www.rudeando.com/portfolio/mita/haciendademitau306.html
source file example : http://www.rudeando.com/portfolio/mita/kitchen-360.fla & swf holder : [URL=“http://www.rudeando.com/portfolio/mita/hmita-u306.fla”]http://www.rudeando.com/portfolio/mita/hmita-u306.fla
the code im using in this hallway-360.swf, kitchen-360.swf, mainbedroom-360.swf,…
this.onMouseMove = function() {
constrainedMove(bg_mc, 8, 8);
};
function constrainedMove(target:MovieClip, speed:Number, dir:Number) {
var mousePercent:Number = _xmouse/Stage.width;
var mSpeed:Number;
if (dir == 1) {
mSpeed = 1-mousePercent;
} else {
mSpeed = mousePercent;
}
target.destX = Math.round(-((target._width-Stage.width)*mSpeed));
target.onEnterFrame = function() {
if (target._x == target.destX) {
delete target.onEnterFrame;
} else if (target._x>target.destX) {
target._x -= Math.ceil((target._x-target.destX)*(speed/100));
} else if (target._x<target.destX) {
target._x += Math.ceil((target.destX-target._x)*(speed/100));
}
};
}
thank you very much people!!!