the problem:
while pressing on a button, the text should scroll down continuously while pressing. the problem is that it only scrolls down one line at a time while pressing, so you have to keep clicking instead of keep on press.
the problem only occurs when there are 2 sets of scroll buttons (first for dynamic text field 1 and second for dynamic text field 2). if there is only one, then it works fine. when there are both sets, only the second one works and the first does not. (i deleted the code for the second set of scroll buttons, and when i do that, the first set now scrolls fine while pressing.)
any clue as to why this is happening? here's the code:
TIA,
decibelle
//SCROLL ARROWS1
up_btn.onPress = function(){
press1 =true;
move1 = -1;
play_text.scroll = play_text.scroll + move1
};
up_btn.onRelease = function (){
press1 = false;
};
down_btn.onPress = function(){
press1 =true;
move1 = 1;
play_text.scroll = play_text.scroll + move1
};
_root.onEnterFrame = function(){
if (press1 ==true){
play_text.scroll = play_text.scroll + move1
}
}
down_btn.onRelease = function (){
pressing = false;
};
//SCROLL ARROWS2
up2_btn.onPress = function(){
pressing2 =true;
movement2 = -1;
play2_text.scroll = play2_text.scroll + movement2
};
up2_btn.onRelease = function (){
pressing2 = false;
};
down2_btn.onPress = function(){
pressing2 =true;
movement2 = 1;
play2_text.scroll = play2_text.scroll + movement2
};
down2_btn.onRelease = function (){
pressing2 = false;
};
_root.onEnterFrame = function(){
if (pressing2 ==true){
play2_text.scroll = play2_text.scroll + movement2
}
}
while pressing on a button, the text should scroll down continuously while pressing. the problem is that it only scrolls down one line at a time while pressing, so you have to keep clicking instead of keep on press.
the problem only occurs when there are 2 sets of scroll buttons (first for dynamic text field 1 and second for dynamic text field 2). if there is only one, then it works fine. when there are both sets, only the second one works and the first does not. (i deleted the code for the second set of scroll buttons, and when i do that, the first set now scrolls fine while pressing.)
any clue as to why this is happening? here's the code:
TIA,
decibelle
//SCROLL ARROWS1
up_btn.onPress = function(){
press1 =true;
move1 = -1;
play_text.scroll = play_text.scroll + move1
};
up_btn.onRelease = function (){
press1 = false;
};
down_btn.onPress = function(){
press1 =true;
move1 = 1;
play_text.scroll = play_text.scroll + move1
};
_root.onEnterFrame = function(){
if (press1 ==true){
play_text.scroll = play_text.scroll + move1
}
}
down_btn.onRelease = function (){
pressing = false;
};
//SCROLL ARROWS2
up2_btn.onPress = function(){
pressing2 =true;
movement2 = -1;
play2_text.scroll = play2_text.scroll + movement2
};
up2_btn.onRelease = function (){
pressing2 = false;
};
down2_btn.onPress = function(){
pressing2 =true;
movement2 = 1;
play2_text.scroll = play2_text.scroll + movement2
};
down2_btn.onRelease = function (){
pressing2 = false;
};
_root.onEnterFrame = function(){
if (pressing2 ==true){
play2_text.scroll = play2_text.scroll + movement2
}
}