why doesnt this work!!!
projectSearch.clientListMask.onMouseMove = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
clientListScroll = Math.max(0, Math.min(this._ymouse-20, 175)) / 175;
calClientListPosition();
} else {
projectSearch.clientLinksHolder.ypos = 40;
}
}
ypos triggers some script that it supposed to tween the mc back to its start position when rolling out of the hit area. all parts work on their own but when i put them together it gets funky.
view the link at http://www.blog.en-vuela.com/projects – click ‘search projects’ and then scroll over client list.
any help is much appreciated!!!
i also tried:
projectSearch.clientListMask.onMouseMove = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
clientListScroll = Math.max(0, Math.min(this._ymouse-20, 175)) / 175;
calClientListPosition();
} else if (!(this.hitTest(_root._xmouse, _root._ymouse, false))) {
projectSearch.clientLinksHolder.ypos = 40;
}
}
turns out i did not even need the onMouseMove function, so here is my full current code for the scrolling function, and it works! - not quite as smooth as i want it to be yet though.
and the link: http://www.blog.en-vuela.com/projects – cick on ‘search projects’ at the bottom and then scroll over the client list.
var clientListScroll = 0;
function calClientListPosition(){
projectSearch.clientLinksHolder._y = Math.round(projectSearch.clientListMask._y - Math.max(0, lastClientLink._y + linkBtnHeight - projectSearch.clientListMask._height) * clientListScroll);
}
projectSearch.clientListMask.onEnterFrame = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
clientListScroll = Math.max(0, Math.min(this._ymouse-20, 175)) / 175;
calClientListPosition();
} else if (!(this.hitTest(_root._xmouse, _root._ymouse, false))) {
trace (“mouseIsNotOVer”);
projectSearch.clientLinksHolder.ypos = 40;
}
}
**** any tips on getting it to be a smoother scroll would be killer.
Here is the latest, better and better bit by bit!
// on the mc i want to scroll (projectSearch.clientLinksHolder)
onClipEvent (load) {
yspeed = 10;
}
onClipEvent (enterFrame) {
current_y = this._y;
dif_y = current_y-ypos;
this._y = current_y-(dif_y/yspeed);
}
// on root actions layer:
var clientListScroll = 0;
function calClientListPosition(){
newY = Math.round(projectSearch.clientListMask._y - Math.max(0, lastClientLink._y + linkBtnHeight - projectSearch.clientListMask._height) * clientListScroll);
projectSearch.clientLinksHolder.ypos = newY;
}
projectSearch.clientListMask.onEnterFrame = function() {
if (this.hitTest(_root._xmouse, _root._ymouse, false)) {
clientListScroll = Math.max(0, Math.min(this._ymouse-20, 175)) / 175;
calClientListPosition();
} else if (!(this.hitTest(_root._xmouse, _root._ymouse, false))) {
//trace (“mouseIsNotOVer”);
projectSearch.clientLinksHolder.ypos = 40;
}
}
any way it could be better?
(i would prefer for it to wait to start scrolling until the mouse moves up or down the list rather than right away.)
here’s the link: http://www.blog.en-vuela.com/projects – click on ‘search projects’ at the bottom and then scroll through client list.
erm a swf to see what is going on would help
can’t seem to load your website
[quote=randomagain;2344876]erm a swf to see what is going on would help
can’t seem to load your website[/quote]
can you see the flash content on either of these pages?:
http://www.blog.en-vuela.com/home
http://www.blog.en-vuela.com/projects
what browser / platform are you using?