
06.07.2005, 14:06
|
|
Регистрация: Jul 2005
Сообщений: 225
|
panorama.allow_move=false;
panorama.acceleration=30;
panorama_mover={}
panorama_mover.onMouseDown=function(){
_root.panorama.allow_move=true;
}
panorama_mover.onMouseUp=function(){
_root.panorama.allow_move=false;
}
Mouse.addListener(panorama_mover);
panorama.onEnterFrame=function(){
if (!this.allow_move) return 0;
if((_root._xmouse>Stage.width/2) && (Math.abs(this._x)<(this._width-Stage.width)))
this._x-=(_root._xmouse-Stage.width/2)/this.acceleration;
if(((_root._xmouse<Stage.width/2)) && this._x<0)
this._x+=(Stage.width/2-_root._xmouse)/this.acceleration;
}
---------------------------------------
1. создаешь мувик панорамы panorama
2. центрируешь на сцене
3. ctrl+enter
|