|
-
carousel modifications
I have a working carousel. It's controlled by mouse movement and moves from left to right depending on your mouse cursor position.
Currently clicking on a image in the carousel loads either a swf, jpg or node from the xml file which is all good.
What I would like it to do however is once a image in the carousel is clicked on, the carousel should freeze and have the selected item highlighted. When you click on it again, the carousel should animate as before, scrolling left or right depending to you cursor position.
My script looks like this >
---------------------------------
//Function for on press events
clickAction = function (obj) {
click code...
}
//Builds menu content based on XML date
for (i=0; i<total; ++i) {
this.content_mc.image_mc.duplicateMovieClip("image _mc"+i, i);
this.content_mc["image_mc"+i]._x = imageWidth*i;
loadMovie(image[i], this.content_mc["image_mc"+i].holder);
this.content_mc["image_mc"+i].link = link[i];
this.content_mc["image_mc"+i].bttn._width = imageWidth;
this.content_mc["image_mc"+i].bttn._height = imageHeight;
this.content_mc["image_mc"+i].preloader._x = imageWidth/2;
this.content_mc["image_mc"+i].preloader._y = imageWidth/2;
this.content_mc["image_mc"+i].naam = naam[i];
}
//Set boundry mask
content_mc.setMask(mask_mc);
boundryWidth = mask_mc._width;
boundryHeight = mask_mc._height;
//Buffer size left and right of menu
buffer = (imageWidth)*2;
//Detect mouse position
this.onMouseMove = function() {
if (this._xmouse>0 && this._xmouse<(boundryWidth)) {
if (this._ymouse>0 && this._ymouse<(boundryHeight)) {
ratio = this._xmouse/boundryWidth;
diff = content_mc._width-boundryWidth+buffer;
destX = Math.floor(-ratio*diff)+buffer/2;
}
}
};
//Scroll easing
this.onEnterFrame = function() {
content_mc._x += (destX-content_mc._x)/85;
if (content_mc._x>0) {
content_mc._x = 0;
} else if (content_mc._x<(boundryWidth-content_mc._width)) {
content_mc._x = boundryWidth-content_mc._width;
}
};
stop();
Is there anyone who can help me achieve this action ?
-
Please can somebody help me out ? If you cannot do it free, tell me what is will cost so we can talk.
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|