hello all.
i’m having a problem concerning the functions on(press) and on(rollOver).
i have a movieclip (text.swf) that contains text (which is also a movieclip) that can be scrolled up and down with two buttons. the text movieclip has the following code:
[COLOR=RoyalBlue][COLOR=Blue]onClipEvent (load) {
oben = this._y;
mask = 10;
unten = -this._height+mask;
speed = 20;
_parent.up = false;
_parent.dwn = false;
}
onClipEvent (enterFrame) {
if (_parent.up) {
if (this._y<oben) {
this._y += speed;
}
}
if (_parent.dwn) {
if (this._y>unten) {
this._y -= speed;
}
}
}[/COLOR]
[COLOR=Black]and the down-button has the following script:
[COLOR=Blue]on(press){
dwn=true
}
on(release){
dwn=false
}
[COLOR=Black]and the same script lies on the up button but instead of dwn it says up.
up to this point everything works fine when i preview the film.
now i would like to load this movieclip (text.swf) into another movieclip.
[COLOR=Blue][COLOR=Black]this script is on the first frame:[/COLOR]
loadMovie(“text.swf”, “_root.container”);
[COLOR=Black]
as you can see the movieclip “text.swf” is beeing loaded into a movieclip with the instance name “container” even up to this point there are no problems and everything works the way it should. but now i would like to have the option that i can drag the “container”[/COLOR] [COLOR=Black]with my mouse, so i use the following code:[/COLOR]
on (press) {
startDrag("");
drag=true;
}
on (release) {
stopDrag();
drag=false;
}
[COLOR=Black]this is when i’m having problems. now i am able to drag around the container, containig the text.swf but the scroll buttons wont work, so i can’t scroll my text.[/COLOR]
anyone out there who can help me with this??
i’d appreciate any help.
thanks.
[/COLOR]
[/COLOR][/COLOR][/COLOR][/COLOR]