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:

IBrowserManager.init()

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 (2.0.0.11). 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);
Advertisements

Actions

Information

4 responses

27 06 2008
Cliff Hall

Hi Justin,

Nope. This problem still exists with IE7. Sounds like a machine gun when IE goes into a loop if you have your sound turned on. I was just searching the interweb to see if anybody else had this problem. And it’s not just the debug player, the normal player has the problem as well.

The odd thing is it’s working when I open my app’s HTML wrapper from the filesystem, but when I deploy it to a server it goes into machine-gun mode.

Bummer, I just backed SWFAddress out of my Flex application in favor of BrowserManager, figuring there was no sense saddling my client with another library when Flex already has the functionality.

I just reverted to a tag where I was using SWFAddress, and the functionality is perfect in IE7 as well as Firefox.

-=Cliff>

-=Cliff>

27 06 2008
Justin J. Moses

Hey Cliff,

there is something weird here I agree. I mean, I’m now using the init() method successfully in both IE6 and 7, FF 2 / 3 and Safari 3 (albeit I pass in NULL for the value argument). I confess, I’m not sure how it started working. I was fiddling with these features some time ago and some time after removing and then re-adding init() it started working.

weird.

I hadn’t heard of SWFAddress before today, thanks for the heads up. Question – does it work in Opera? Because as of my last tests, BrowserManager wasn’t correctly functioning in Opera.

cheers,
justin

27 06 2008
19 01 2010
Andrew

Same problem here (machine gun effect in IE7). IE8 and Mozilla work as it should.

So Annoying. If anyone finds an answer, I would love to know.

Andrew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: