Up&Down MC scroll buttons

need i say it worked like a charm.
thnx man.
You even thought me sum’n new, i never realised that u could mix commands like that b4.

You’re welcome :slight_smile:
:thumb:

whoa, not so fast claudio!
i just deleted the two first frames of my movie cuz i decided not to use the preloader i had on them anymore and now the scrollin effect isnt working anymore.

Hmmm weird. Are you sure there werent no actions on the first 2 frames?
:-\

u mean b4 or after deleting

Yeah

both.
b4, i had the actions related to the preloading.
after, i have actions relating to some “pop up” functions and a stop function.

Can you post ur fla?

cant, my contract forbids it

Sorry, i cant see why its not working wihtout seeing the code.

um heres the code on the first layer of the first frame
[AS] Movieclip.prototype.openWinCentre = function (url, winName, w, h, toolbar, location, directories, status, menubar, scrollbars, resizable) {
getURL (“javascript:var myWin; if(!myWin || myWin.closed){myWin = window.open(’” + url + “’,’” + winName + “’,’” + “width=” + w + “,height=” + h + “,toolbar=” + toolbar + “,location=” + location + “,directories=” + directories + “,status=” + status + “,menubar=” + menubar + “,scrollbars=” + scrollbars + “,resizable=” + resizable + “,top=’+((screen.height/2)-(” + h/2 + “))+’,left=’+((screen.width/2)-(” + w/2 + “))+’” + “’)}else{myWin.focus();};void(0);”);
}
stage.showmenu=false;[/AS]

and this is the code on the third layer of the first frame
[AS]stop();
[/AS]

That code wont affect the buttons. After u deleted the first 2 frames, everythig is working right except the dragOut action?

no, the up and down buttons stop responding completely

Then you must have erased the prototype for scrolling the movie clip.

no comprende. :> whats a prototype.
do u mean this, cuz its still there
[AS]//speed of scroll
var speed = 15;
//Stopping _y Coord for Scroll Up Button
var howFarUp = 470;
//Stop _y Coord for Scroll Down Button
//my example as a registration point in the top center
//so this can change depending on registration point location
var howFarDown = 10-(myClip._height/2);
//prototype function for scrolling up button
MovieClip.prototype.moveUp = function() {
//when it enters the frame
this.onEnterFrame = function() {
//if myClip is less than or equal to howFarUp
if (myClip._y>=howFarUp) {
//delete the onEnterFrame so it can’t scroll anymore
delete this.onEnterFrame;
} else {
//else keep scrolling it
myClip._y += speed;
}
};
};
//prototype function for down button
MovieClip.prototype.moveDown = function() {
//when it enters the frame
this.onEnterFrame = function() {
//if myClip._y less than or equal to howFarDown
if (myClip._y<=howFarDown) {
//delete the onEnterFrame so it can’t scroll
delete this.onEnterFrame;
} else {
//else keep scrolling it
myClip._y -= speed;
}
};
};
//when the “up” movie clip button is pressed call the moveUp function
up.onPress = moveUp;
//when the “down” movie clip button is pressed call the moveDown function
down.onPress = moveDown;
//when either of the movie clip buttons are released delete the onEnterFrame to stop scrolling
up.onRelease = down.onRelease=function () {
delete this.onEnterFrame;
};
[/AS]

Ok, remove the dragOut i told you to use before. Now replace this
[AS]up.onRelease = down.onRelease=function () {
delete this.onEnterFrame;
[/AS]For this:
[AS]up.onRelease = down.onRelease = up.onDragOut = down.onDragOut = function () {
delete this.onEnterFrame;[/AS]