Error: Incorrect number of arguments. Expected 1.
hello guys, im new to actionscript, i start practice a little and i wrote this code so far:
stop();
import flash.events.TouchEvent;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;
var touchID:int = 0;
var posXonTouch:int = 0;
var posXmove:int = 0;
var TouchB:int = 0;
var RightShift:int = 0;
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
this.stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
function onTouchBegin (e:TouchEvent):void{
posXonTouch = e.stageX;
}
this.stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);
function onTouchMove (e:TouchEvent):void{
posXmove = e.stageX;
if(posXmove > posXonTouch + 50) {
RightShift = posXmove - posXonTouch;
zom.nextFrame();
}
if(posXmove < posXonTouch + 50) {
RightShift = posXmove - posXonTouch;
zom.prevFrame();
}
touchID = e.touchPointID;
}
this.stage.addEventListener(Event.ENTER_FRAME , PlayPrev);
function PlayPrev(e:Event):void {
zom.prevFrame();
}
this.stage.addEventListener(TouchEvent.TOUCH_END, onTouchFinsh);
function onTouchFinsh (e:TouchEvent):void{
if(posXmove > posXonTouch + 50) {
PlayPrev(); <============== THIS IS LINE 56 *********************************
}
if(posXmove < posXonTouch + 50) {
}
}
i am getting an error saying:
| Scene 1, Layer 'AS3', Frame 1, Line 56 | 1136: Incorrect number of arguments. Expected 1. |
i not fully understand why, if any1 could help.
thanks
