AS3使用过程中问题总结

1.Starling项目启动时报错This application is not correctly embedded (wrong wmode value)

这个其实是Flash报的“ErrorEvent:。 text=Error #3702: Context3D 不可用”错误被Starling变了一下。
解决方法:找到项目文件夹中的html-template,并找到index.template.html,右键使用TextEditor编辑,在
 params.allowfullscreen=”true”;后面加上params.wmode = "direct";最好下面的embed也这样配置下 <param name="allowFullScreen" value="true" />后面加 <param name="wmode" value="direct" />


如果是手机项目,没有index.template.html文件,则在项目的app.xml里面改(一般是项目名-app.xml文件)。在“</initialWindow>”前面增加两行
        <renderMode>direct</renderMode>
        <fullScreen>true</fullScreen>
就算已经有<fullScreen>true</fullScreen>了也要在renderMode后面加一行,要不然会出现不报错的白屏。


------------------------------------------------------------------------------------------------
PS:附加正常运行的手机项目的-app.xml的initialWindow配置:
<renderMode>direct</renderMode>//必须为direct
<aspectRatio>landscape</aspectRatio>//portrait竖直,landscape横版
<autoOrients>false</autoOrients>//这行是true或者false都行
        <fullScreen>true</fullScreen>//必须为true
        <visible>true</visible>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

流子

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值