function downward(){
if (txt._y>-32.8) [this bit stops the text from being able to scroll outside of the area which it is meant to]
txt._y=txt._y-2; [this controls the scroll and tells flash to more 2 pixels every time the button is pressed]
}
function upward(){
if (txt._y<27.2)
txt._y=txt._y+2;
}
function mover(myscroller){
goer=setInterval(myscroller,1000);
goer;
}
on(press){
clearInterval(mover);
mover(upward);
}This makes the custom scroll bar work.
I made an invisible button using the rectangle tool and deleting the frames apart from on the hit state for the handle, to make the doors open. This code was used:
This gets flash to play frame two, which has no stop command, so flash plays to the end of the doors opening as that frame has a stop command.on(press){
gotoAndPlay(2);
}
var myPassword:String= 'password' [this sets the password, in this case it is password]
submit_btn.onRelease=function(){
if (password_txt.text== myPassword ){
gotoAndStop(3); [if the password is correct this tells flash to go to and stop on frame 3]
}
else{
gotoAndStop(2); [if the password is incorrect flash will go and stop on frame 2]
}
}
packsbut.addEventListener(MouseEvent.MOUSE_OVER,packsplay); [the button will do something when the mouse hovers over it]
function packsplay(event:MouseEvent):void
{ packs.gotoAndStop(2); [the button will cause flash to got to and stop on frame two of the packs movie clip, this will show the text]
}
packsbut.addEventListener(MouseEvent.MOUSE_OUT,packsstop);
function packsstop(event:MouseEvent):void
{ packs.gotoAndStop(1); [when the mouse leaves the invisible button it will return the movie clip to frame one, making the text disappear again.]
}











