How can I use URL parameters while debugging in Flash Builder 4?

淺唱寂寞╮ 提交于 2019-12-23 13:07:29

问题


How can I use URL parameters while debugging in Flash Builder 4?


回答1:


Modify your html template

In the "html-template" directory in your project open "index-template.html" up and modify the following lines of code to suite your needs:

var flashvars = {};
if (swfobject.getQueryParamValue("foo") && swfobject.getQueryParamValue("abc")) {
    flashvars.foo = swfobject.getQueryParamValue("foo");
    flashvars.abc = swfobject.getQueryParamValue("abc");
}

Please note that this is for a Flex 4 SDK project.

Further details may be found over here: SWFObject docs




回答2:


You can modify the url that is used when FB launches the project for debugging in the project properties. Just set your parameters there and them access them through the usual FlexGlobals.topLevelApplication.parameters.



来源:https://stackoverflow.com/questions/3184990/how-can-i-use-url-parameters-while-debugging-in-flash-builder-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!