This content has been marked as final. Show 6 replies
when you embed your swf in an HTML page you can always pass request parameters like www.xyz.com?t=2. Or alternatively you can use flashvars to send these parameters.
See the index.template.html file in html-template folder in your Flex Builder.
Now these request time parameters can be accessed as, to illustrate the URL above, Application.application.parameters.t or Application.application.parameters.foo Application.application.parameters.bar.
Usually you read these parameters in the applicationComplete event and then take some actions; in this case setting the tab index.
I tried www.xyz.com?t=2, but it still goes to the first tab.
Will your users always access the same tab? If so, set the tab navigator's selectedIndex when the app loads.
myTabNavigator.selectedIndex = 1;
Most of the users would go to the first tab, but some users need to access the application from their application via a link and would like to go to the 4th tab directly.
Try ATTA's suggestion. Never used it myself, or I'd give you more details. Looks like he's suggesting you can do something like:
var urlParam:String = Application.application.parameters.t;
...on the app's creationComplete event to grab the '2' out of 'www.xyz.com?t=2'
Have you tried this yet?
I don't have the code example handy now, but if you search a bit you will find it.