Starling项目启动时报错

http://xuzonglian.blog.163.com/blog/static/1103658822012627550737/


这个其实是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>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值