Kokodoko
Kokodoko

Reputation: 28128

SWFaddress stuck in infinite loop

I have an issue with SWFAddress in Flash: when the user navigates to a page within my flash app, I call "setValue".

This changes the URL in the browser's address bar, which in turn calls the "externalChange" event in flash. This event causes the flash app to load the page displayed in the url bar... so the app keeps changing the flash page and updating the url bar into infinity.

How do I know if the url bar was changed by flash or manually by the user?

Upvotes: 0

Views: 121

Answers (1)

weltraumpirat
weltraumpirat

Reputation: 22604

You should always set up SWFAddress to handle navigation events instead of page changes:

User clicks a button within Flash app
=> SWFAddress.setValue() 
=> browser URL changes 
=> change event is received in Flash app
=> Flash app changes the page

Then there is no need to differentiate between changes in the status bar and changes from within Flash - they are one and the same.

Upvotes: 1

Related Questions