PDA

View Full Version : Should be simple...but



crazyanimator
October 14th, 2002, 12:10 PM
Ok folks, need a hand here.

I am trying to create a scrolling text section for a cd-rom I am creating. I have created buttons for the scroll up and scroll down and so far all I am able to get is a click click click to scroll up and down 1 line at a time. Would prefer to make a loop so when you hold down the button it "scrolls" until you release. Have had no luck in setting variables on press and release. Has anyone had any experience in this? Something so simple has me at wits end.

Why oh why cant flash have a button.isstilldown like director argh!

lostinbeta
October 14th, 2002, 12:11 PM
What version of Flash are you using?

crazyanimator
October 14th, 2002, 12:13 PM
Using MX sorry should have said that earlier

lostinbeta
October 14th, 2002, 12:17 PM
Well if you are using MX, you can apply button event to a movie clip.

So just a hunch, never tried it out, and I don't know if it is "optimized", but try this...


onClipEvent (enterFrame) {
on (press) {
//insert code here
}
on (release) {
//insert code here
}
}

<B>EDIT: Just tested that, it doesn't work</B>

lostinbeta
October 14th, 2002, 12:24 PM
Ok, now try this one...


on (press) {
this.onEnterFrame = function() {
//insert actions here
};
}
on (release) {
//insert actions here
}

No errors, and I tested it with a trace function and it seemed to work.

crazyanimator
October 14th, 2002, 12:34 PM
are the man!

That works perfect. If you are ever in the Tampa, FL area stop by I owe you a beer for sure.
:)

lostinbeta
October 14th, 2002, 12:38 PM
Haha, awesome. Well actually I am not old enough to legally drink yet (18), but by the time I ever get a chance to go to Tampa, FL, I am sure I will be :)