gpt4 book ai didi

Adobe Animate Air - android using phone proximity sensor to turn off screen?(Adobe Animate Air-Android使用手机接近感应器关闭屏幕?)

转载 作者:bug小助手 更新时间:2023-10-25 17:35:13 28 4
gpt4 key购买 nike



Still trying to explore action script.
Is there any way to access an android phone proximity sensor? Would like to turn off the sceen using the output from the sensor.
Found the richardolsson / proximity-sensor-ane ( https://github.com/richardolsson/proximity-sensor-ane?search=1 ) TBH I don't have a clue what I am doing with it.
Any help would be awesom. TIA

还在努力探索动作剧本。有没有办法访问Android手机的接近感应器?想要使用传感器的输出关闭探测器。找到了里查多松/接近感应器(https://github.com/richardolsson/proximity-sensor-ane?search=1),我不知道我在用它做什么。任何帮助都将是令人敬畏的。提亚


import se.riol.anes.proximitysensor.ProximitySensorInterface;

var proximity:ProximitySensorInterface;

proximity = new ProximitySensorInterface();
proximity.addEventListener(StatusEvent.STATUS, handleProximity);
proximity.start();

function handleProximity(ev:StatusEvent):void
{
trace('proximity: ' + ev.level);
}

更多回答

1. You probably should start with learning, what is ANE and how do you add one to the project while working with the IDE you use. 2. The trace method is intended for the debug output, I don't remember now but it is either difficult or outright impossible to get the debug output on your mobile device. It is far easier to devise a TextField and output there all the things you want to see.

1.您可能应该从学习什么是ANE开始,以及如何在使用您使用的IDE的同时将其添加到项目中。2.跟踪方法是用于调试输出的,我现在不记得了,但在您的移动设备上获取调试输出要么很困难,要么根本不可能。设计一个Textfield并在那里输出您想要查看的所有内容要容易得多。

优秀答案推荐
更多回答

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com