我为我的家人做了一个程序快速调用将照片拖到callit圈或smsit cricle但是我需要拨号代码
^& ^& ^& ^我希望代码自动启动呼叫不是电话应用程序中的号码^& ^& ^& ^
Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;
father.addEventListener(TouchEvent.TOUCH_BEGIN, onTouchBegin);
father.addEventListener(TouchEvent.TOUCH_END, onTouchEnd);
function onTouchBegin(e:TouchEvent)
{
e.target.startTouchDrag(e.touchPointID);
}
function onTouchEnd(e:TouchEvent)
{
e.target.stopTouchDrag(e.touchPointID);
if (callit.hitTestObject(father))
{
(??????)
}else if(smsit.hitTestObject(father)){
gotoAndStop(2);
}}
答案 0 :(得分:2)
在手机应用程序中使用tel:和sms:uri方案:
http://macromedia.com/devnet/air/quick_start_as/quickstarts/qs_using_uris.html
使用tel:URI方案启动系统电话拨号程序
public function call():void
{
const callURL:String="tel:1234567890";
var targetURL:URLRequest = new URLRequest(callURL);
navigateToURL(targetURL);
}
或者,从TextField中的HTML超链接:
var call:TextField = new TextField();
call.htmlText ="<a href='tel:1234567890'>Call</a>";
短信短信将是:
public function sms():void
{
const callURL:String="sms:1234567890";
var targetURL:URLRequest = new URLRequest(callURL);
navigateToURL(targetURL);
}