Hi, I can’t put a video on flash with actionscript because appears this error. I put this code, and the button are with instace name btRewind. I don’t understand why is not working…
movie.stop();
var previous:Boolean=false;
var next:Boolean=false;
addEventListener(Event.ENTER_FRAME, onAnimation);
function onAnimation(evt:Event):void {
if (next) {
movie.nextFrame();
}
if (previous) {
movie.prevFrame();
}
}
btNext1.addEventListener(MouseEvent.MOUSE_DOWN, onNextOn);
btNext1.addEventListener(MouseEvent.MOUSE_UP, onNextOff);
btPrevious.addEventListener(MouseEvent.MOUSE_DOWN, onPreviousOn);
btPrevious.addEventListener(MouseEvent.MOUSE_UP, onPreviousOff);
btPlay.addEventListener(MouseEvent.MOUSE_UP, onPlay);
btRewind.addEventListener(MouseEvent.MOUSE_UP, onRewind);
function onNextOn(evt:Event):void {
next = true;
}
function onNextOff(evt:Event):void {
next = false;
}
function onPreviousOn(evt:Event):void {
previous = true;
}
function onPreviousOff(evt:Event):void {
previous = false;
}
function onPlay(evt:Event):void {
movie.play();
}
function onRewind(evt:Event):void {
movie.gotoAndStop(1);
}