In order to make a gesture driven scrolling without break, please do the following:
1. Place 11-movie clips on the stage aligned horizontally at the bottom. These clips can be any graphic, jpg, gif, or a simple rectangle. Name each of those clips like m0, m1,....m11.
2. Creat another movie clip, namely "Controller" which will control the other 11-movie clips movement.
3. Edit the "Controller" movie clips and place the following in its Frame1 through Frame 3:
ActionScript for Frame 1 of "Controller" movie clip:
this._visible=false;//making the "Controller" invisible
function createClipsArray() {//creating Array for
//11-movie clips reference
var holder = new Array();
for (var i = 0; i < 11; i++) {
if (null != _parent["m" + i]) {
holder[i] = _parent["m"+ i];
}
}
return holder;
}
var Clips = createClipsArray();
var MW=550;//stage width
var Center=MW/2;//stage center
var TW=1180;//an arbitrary width of 11-movie clips
var Cons=(Math.pow(Center,3)+Math.pow(MW,3)+Math.pow(M W,2)+Math.pow(Width,2))/3;
var MouseX=0;
mouseLocation=0;
ActionScript for Frame 2 of the "Controller" movie clip:
var isOver=_root._xmouse>=1 && _root._xmouse<=550 &&_root._ymouse>=0 && _root._ymouse<=400;//stage area over which scrolling takes affect
//according to mouse position
if(isOver){
MouseX=_root._xmouse-Center;
mouseLocation=mouseLocation-Math.pow(MouseX*3,3)/Cons;
}
var ClipOrigin=0;
for(var i=0;i<Clips.length;i++){
mouseLocation=mouseLocation%TW;
var newX=mouseLocation+ClipOrigin;
if(newX+Clips[i]._width<0){
newX=TW+newX;
}else if(newX>MW){
newX=newX-TW;
}
Clips[i]._x=newX;
ClipOrigin+=Clips[i]._width;
}
ActionScript for Frame 3 of the "Controller" movie clips
gotoAndPlay(2);
Thats all for gesture driven scrolling without break. Now test your movie.
This is in reply to my earlier topic which is read by a lot without any reply. Since, I know how to do it, therefore, I feel that everyone on this forum who dont know it may now know it.
I appreciate if someone can send me a Sothink Decompiler for learning purpose on the following email addresses:
[email protected]
or
[email protected]
Regards,