stop-play-start
- når man kører curseren hen over movieclip skiftes der scroll retning. Hvor er det lige jeg indsætter en start stop on mouse click og hvordan ?// Her er scriptet :-o
stop();
var totalClips = 3;
var holdPosition = false;
var maxSpeed = 2;
//Defaults
var slideSpeed = 0.5;
var currentMousex = 0;
var clipBaseName = 'imgbox';
var w_clips = this[clipBaseName + '1']._width+0;
var totalWidth = (totalClips * w_clips);
var maxleft = imgbox1._x;
var maxright = (totalWidth/2);
//--
onEnterFrame = function(){
currentMousex = Math.floor(this._xmouse);
if(maxSpeed != false) currentMousex = (currentMousex >= maxSpeed)? maxSpeed : -maxSpeed;
$
//-----------------------------------------
if(!holdPosition){
for(i=0;i <= totalClips; i++){
var tmpObj = this[clipBaseName + i];
tmpObj._x = Math.floor(tmpObj._x-(currentMousex*slideSpeed));
if(tmpObj._x <= maxleft){tmpObj._x += totalWidth;}
if(tmpObj._x >= maxright){tmpObj._x -= totalWidth;}
}
}
}