Flex, BrowserManager and init()

7 02 2008

Okie dokie – so the Flex docs included with Flex Builder are quite comprehensive.

In regards to handling your own query string fragments, you can’t go wrong with the supplied help. Unless of course you’ve got some browser issues.

With IE6, the following:


Seems to send the browser on a loop of BROWSER_URL_CHANGE events. Huh. I imagine this is fixed in IE7 though I haven’t checked as yet. (This is with Adobe debugger player v9.0.r115 on IE6)

Interestingly, you can still set the page title via IBrowserManager.setTitle(), and disable the Applications history management with the property historyManagementEnabled set to false.

Not using the init() method is seemingly a work around, but guess what? That then kills the functionality in FireFox ( Huh.

NOTE: not supported either way is Opera 9.5 – which plays the Flex application fine, but doesn’t seem to support the BrowserManager.

June 27, 2008: Try using null for the value argument, and attaching the event listener AFTER the init() call and see how you go. This error is seemingly intermittent.

//initialise the browser manager
bm.init(null, "My Title");            
//handle browser-level back button
bm.addEventListener(BrowserChangeEvent.BROWSER_URL_CHANGE, backPressed);