4

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

1
  • Does this approach below work only with an http:// url (from an app server) or will it also work with a file:/// url from the file system? Commented Dec 13, 2010 at 4:07

2 Answers 2

3

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.

Sign up to request clarification or add additional context in comments.

Comments

2

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.