[英]Adobe air NativeAlert for iOS and Android
Just wondering anyone have success implementing the following native extension ? 只是想知道有人成功实现了以下本机扩展吗?
Somehow I couldn't get it to work. 不知何故我无法正常工作。
When I did a check on if(NativeAlert.isSupported)
it returned me true. 当我检查
if(NativeAlert.isSupported)
它返回了true。 However the alert dialogue never showed up. 但是,警告对话框从未出现。
import pl.mateuszmackowiak.nativeANE.alert.NativeAlert;
import pl.mateuszmackowiak.nativeANE.NativeDialogEvent;
import pl.mateuszmackowiak.nativeANE.toast.Toast;
NativeAlert.defaultTheme = NativeAlert.ANDROID_DEVICE_DEFAULT_DARK_THEME;// not necessary
if(NativeAlert.isSupported){
NativeAlert.show( “some message” , “title” , “first button label” , “otherButtons,LabelsSeperated,WithAComma” , someAnswerFunction);
}else{
_modalDialogue.simplecloseModalDialoge();
}
//NativeAlert.dispose(); //only when exiting app
//Toast
Toast.show(“some message”,Toast.LENGTH_LONG);
var randX:int = Math.random()*600;
var randY:int = Math.random()*600;
Toast.showWithDifferentGravit(“some message”,Toast.LENGTH_SHORT,Toast.GRAVITY_LEFT,randX,randY);
I have an iPad1 and Adobe Air 3.4, flash CS5 我有一个iPad1和Adobe Air 3.4,Flash CS5
You're using smartquotes. 您正在使用智能引号。 Replace “ and ” with ".
将“和”替换为“。
I suggest you to use a different ANE, from a different developer and test again. 我建议您使用来自其他开发人员的其他ANE,然后再次进行测试。 I use the one from freshplanet (opensource in github) and works perfect.
我使用的是freshplanet(github中的开源)中的一个,并且工作完美。
Here is a post where you can find more infos... http://www.redcodelabs.com/2014/03/adobe-air-native-alerts-using-anes/ 这是您可以在其中找到更多信息的帖子... http://www.redcodelabs.com/2014/03/adobe-air-native-alerts-using-anes/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.