ios触控测试软件,iOS 设备多点触控和屏幕坏点检测程序代码

该博客介绍了如何使用ACTIONSCRIPT进行iOS设备的触控测试,包括多点触控和屏幕触点检测。通过监听TouchEvent事件,实现触控点的增加、移动和结束,同时动态绘制连接触控点的线条,展示了触控点的轨迹。
摘要由CSDN通过智能技术生成

import flash.events.TouchEvent;

import flash.events.MouseEvent;

import flash.ui.Multitouch;

import flash.ui.MultitouchInputMode;

import flash.display.Sprite;

Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

var text1:String;

var text2:String;

var text3:String;

var touchtotal:int = 0;

var touchMoveID:int = 0;

var touchgrouplength:int;

var touchgroup:Array = new Array();

var ballgroup:Array = new Array();

var myline1:Sprite = new Sprite();

var tempballnum:int;

var tempflagx:Boolean;

var tempflagy:Boolean;

var tempflag:Boolean;

var color:uint = rgb();

if (Multitouch.supportedGestures)

{

text1 = "● SupportsGesture, Support " + Multitouch.maxTouchPoints.toString() + " MaxTouchPoint  ";

}

else

{

text1 = "● No supports Gesture  ";

}

if (Multitouch.supportsGestureEvents)

{

text2 = "SupportsGestureEvents  ";

}

else

{

text2 = "No supports GestureEvents  ";

}

if (Multitouch.supportsTouchEvents)

{

text3 = "SupportsTouchEvents";

}

else

{

text3 = "No supports TouchEvents";

}

mytext1.text = text1 + text2 + text3;

startbutton.addEventListener(TouchEvent.TOUCH_TAP, taphandler);

function taphandler(evt:TouchEvent):void

{

removeChild(startbutton);

removeChild(group1);

removeChild(group2);

stage.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);

stage.addEventListener(TouchEvent.TOUCH_MOVE, onTouchMove);

stage.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);

}

function onTouchBegin(eBegin:TouchEvent)

{

touchtotal = touchtotal + 1;

mytext2.text = "● You have touched " + touchtotal + "points";

touchMoveID = eBegin.touchPointID;

tempflagy = (eBegin.stageY > touchbox.y) && (eBegin.stageY < (touchbox.y + touchbox.height));

tempflagx = (eBegin.stageX > touchbox.x) && (eBegin.stageX < (touchbox.x +

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值