Can you intercept a Flash based url redirect?
I don't know if that question worded quite right, but here is my situation:
We have some older Flash and Flex files that someone befor开发者_如何转开发e me lost the original files on. Now they want to add event tracking when some links inside the SWFs are clicked that use the old navigateToURL type ActionScript. Does anyone know if you can intercept that action with JavaScript so I can add the tracking they want before it redirects the page?
Thank you, I am doubtful of it but my knowledge of ActionScript/Flash is very rusty so I thought I would ask.
Don't know if you can intercept them - but you can rewrite the strings int he compiled swf. Try a tool like this one: http://buraks.com/uae/ It allows you to rewrite the strings that are used as part of the navigateToURL action.
If those navigate URLs are not cross-domain, you could do this:
- Host your Flex app in an iframe
- In your hosting page, poll that iframe to see if its URL changes
Of course, I'm assuming the navigation URLs are not in your domain, or tracking hits to those URLs would already be an easy problem to solve.
精彩评论