View Full Version : [MX] Help making video buttons
CONNOR_LUKE
January 12th, 2005, 07:57 PM
I am making buttons to control a video in flash and all is working fine except I would like the fast forward button to continue going forward as you hold it. At the moment I have this code:
on(press) {
videoclip.nextFrame();
}
which works fine except I have to keep clicking it to go forward. I thought something like this might work:
onClipEvent (enterFrame){
on(press) {
videoclip.nextFrame();
}
}
But this are syntax errors. If anyone could help I would be very grateful.
Rockstar
January 13th, 2005, 02:20 AM
I believe you have to use onEnterFrame
CONNOR_LUKE
January 13th, 2005, 08:54 PM
Sorry but how do you use onEnterFrame? Sorry I still new to flash. I tried using it this way but I got a syntax error
onEnterFrame = function() {
on(press) {
videoclip.nextFrame();
}
}
Also thanx for responding :)
Rockstar
January 13th, 2005, 11:25 PM
no problem.
you can try this
this_btn.onPress = function() {
onEnterFrame = function () {
var frameNum:Number = video._currentframe;
video.gotoAndStop(frameNum+5);
trace(frameNum);
};
};
this_btn.onRelease = function() {
delete onEnterFrame;
};
just incase if you're confused with variable you can remove it, simple change frameNum with video._currentframe and remove trace(frameNum);
so it would look like this:
this_btn.onPress = function() {
onEnterFrame = function () {
video.gotoAndStop(video._currentframe+5);
};
};
this_btn.onRelease = function() {
delete onEnterFrame;
};
good luck
CONNOR_LUKE
January 14th, 2005, 01:37 AM
rockstar thanks so much for your help thats exactly what I needed. Thanx again.
Rockstar
January 14th, 2005, 04:31 AM
you are most welcome connor
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.