If someone can help i will be more than happy. (last time i posted and nobody replied). Im doing a 306º pan style flash, and, as a guide, i used one that it is at http://www.sephiroth.it/test/360/vcr-simulation.html (you can download the flash). I re-scripted almost all the coding, and, at least what i re-coded (because the code is the same), works. But i have problems to set the Min and Max values to the MC and it default X and Y positions too. I will copy the code here. I hope that i didnt miss to copy here something important.
Cursor Code>>i think this has no problems
onClipEvent (load) {
zoom = false
pathMC1 = _root.MC1
MvH = MovieHeight //is a var on the first frame with the dimensions
MvW = MovieWidth //of the movie
duplicateMovieClip (“_root.MC1.MC2”, “img0”, 2);
duplicateMovieClip (“_root.MC1.MC2”, “img1”, 3);
pathMC1.img0._x = pathMC1.MC2._x-pathMC1.MC2._width;
pathMC1.img1._x = pathMC1.MC2._x+pathMC1.MC2._width;
_root.centerX = MvH/2;
_root.centerY = MvW/2;
pathMC1._x = _root.centerX;
}
onClipEvent (mouseDown) {
dragging = true;
_root.centerX = _root._xmouse;
_root.centerY = _root._ymouse;
_visible = true;
_x = _root._xmouse;
_y = _root._ymouse;
}
onClipEvent (mouseUp) {
dragging = false;
_visible = false;
}
onClipEvent (enterFrame)
{
if (!dragging) {
_root.dx = 0.96;
_root.dy = 0.94;
return;
}
if (dragging) {
_root.dx = ((_root.centerX - _root._xmouse)/_root.speedX)(_root.MC1._xscale/100);
_root.dy = ((_root.centerY - _root._ymouse)/_root.speedY)(_root.MC1._yscale/100);
}
}
And here is what i cant fix. It from the original and, if some1 doesnt knows the …/ are equal to _root and …/: are iquals to parent. I found out that on a post here. movieW and movieH are the same of MovieWidth and MovieHeight of my code
onClipEvent (enterFrame)
{
maxX = (…/:movieW/2 - ((_width)/2))
minX = (((_width)/2) - …/:movieW/2)
minY = ((_height - …/:movieH)/2) + …/:movieH/2
maxY = …/:movieH/2 - ((_height - …/:movieH)/2)
// ***************
// y axis
// ***************
_y += …/:dy
if(_y >= minY) _y = minY;
if(_y <= maxY) _y = maxY;
// ***************
// x axis
// ***************
_x += ../:dx
actual_x = (_x - (central._width/2) + ../:movieW/2)
if(actual_x < maxX + (_width/6) && ok){
_x = _x + (_width/3);
ok = 0;
return;
} else {
ok = 1
}
if(actual_x > minX - (_width/6) && ok2){
trace(ok2)
_x = _x - (_width/3);
ok2 = 0;
return;
} else {
ok2 = 1
}
}
onClipEvent (load)
{
ok = ok2 = 1
_y = …/:movieH/2
_x = …/:movieW/2
beginX = _x
}
Please any help will be very welcome, i worked hard to understand the whole code and i just need that bit. Sorry if it so long but you can avoid many things.