加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

An Approach to setting wmode for Stage3D project in Flash Bu

发布时间:2020-12-15 06:29:52 所属栏目:百科 来源:网络整理
导读:There are a lot of posts on how to configure projects to get up and running with Stage3D. With Flash Builder 4.6 and Flex 4.6 SDK some of the steps are not needed,like getting a different? playerglobal.swc ?and setting the? -swf-version=13

There are a lot of posts on how to configure projects to get up and running with Stage3D. With Flash Builder 4.6 and Flex 4.6 SDK some of the steps are not needed,like getting a different?playerglobal.swc?and setting the?-swf-version=13. But you still need to set the?wmode="direct"?in theindex.template.html?for Stage3D content to run.

Reading a bunch of posts some people just change this by hand for each project. Others post about how to change the?index.template.html?in the SDK templates folder. A drawback with this last approach is then all your projects will havewmode="direct"?turned on,which is not necessarily bad but could cause issues in some cases.

My approach is a middle ground,I add a new template file to the templates that has the?wmode="direct"?enabled. Then you have the option to use the?wmode="direct"?by just changing your run configuration to point to this new template html file. Which I call direct.template.html and it comes out as direct.html in the bin-debug folder along side the AppName.html file. The drawback here is if you have projects that have multiple applications it will only copy over this second template for the default application. For this specific drawback you can just copy the?direct.template.htmlover?index.template.html?(since direct.template.html will be in the project) and then have all them set to direct. This still gives you control over what you project should run at but not go looking for how to modify the?index.template.html?for each new project. Read on to see the steps I take to setup this up.

Steps to add direct.template.html and change run configuration

  • Download or copy source from?http://renaun.com/flex4/direct.template.txt?and save it as direct.template.html in the following folder:
    • Win:?C:Program Files (x86)AdobeAdobe Flash Builder 4.6sdks4.6.0templatesswfobject
    • Mac:?/Applications/Adobe Flash Builder 4.6/sdks/4.6.0/templates/swfobject
  • Create a new Flex or ActionScript Project (web not mobile). Check to see ifdirect.template.html?is in the html-template folder.
  • Run the application once to create default run configuration.
  • Click on Run -> Run Configurations…
  • Select the Project’s run configuration and deselect “Use default” in the “URL or path to launch”
  • Change the last .html file name to “direct.html”,leaving the rest of the path the same. See image below:

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读