The pop-up window of flash geturl or navigatetourl is blocked by ie.
Ie7 and firefox (my version is 2.0.0.11) will prevent the navigatetourl method from opening a new window, while the geturl method in as2 will not, which is unpleasant. Since the project has selected as3 development, you can only find a solution.
The first thing that comes to mind is externalinterface. The test finds that it will still be blocked. It would be helpful to add wmode later, so the "wmode" attribute is added to opaque on the page, and it is OK.
The geturl method in as3 is provided:
Function geturl (url: http://www.111cn.net/flash_a/113/string,window:string?#_blamk"): void {var broswer: string = externalinterface. call ("function getbrowser () {return navigator. useragent} ") as string; if (broswer. indexof ("firefox ")! =-1 | broswer. indexof ("msie 7.0 & prime ;)! =-1) {externalinterface. call ('window. open ("'+ url +'", "'+ window +'") ');} else {navigatetourl (new urlrequest (url), window );}}
Use the same method as geturl in AS2. In addition, I only tested ie6/7 and firefox2, and did not test other browsers such as safari. Finally, the most important thing is to set the wmode attribute of the flash object to opaque or transparent in html. Because the default wmode attribute is window, this indicates that the flash application has no interaction with the html layer.
The above idea is to use as call js to implement the pop-up window, which must be combined with wmode = 'opaque 'or wmode = 'transparent '.
But now the times are different and the game rules have changed. The above method is no longer applicable.
I just tested,
Firefox 3.5.3 will not be intercepted during testing.
Both ie7 and ie8 are blocked.
This is a strange thing! So I sorted several flash cops from my favorites and read them one by one. I found that _ blank content is not blocked on the aps tutorial ou website ~
After investigating the code of its webpage, it is found that many websites that will be blocked are a little different: wmode.
Solution:
Finally, we found that setting wmode can solve the problem: when wmode = 'window' (default), ie will no longer intercept it.
This may be related to the activex mechanism in ie.
As mentioned in the article above, "the most important thing is to set the wmode attribute of the flash object to opaque or transparent in html" is not too worried. When wmode is window, you can still call js.
Although there is a solution, I am reluctant to change wmode to window. It seems that I have to communicate with js to allow the js side to bypass interception.
But if you think about it carefully, it is not a problem because the situation of our domestic netizens is very interesting.
Firefox, ie7 +, safari, and google chrome are popular, or Web products, which are high-end Internet users. This group of people know what blocking means, and the goodwill function like "blocking pop-up windows" can also work better. This group of people often set up a white list, so they do not need to worry that they cannot access the content due to browser blocking.
Most of the remaining users who use xp + ie6 are not very enthusiastic about the network, but the browsers of these users will not intercept our flash, and they do not need to learn network filtering settings.
Hey, the positions of various companies are naturally harmonious.
Differences between several wmodes
By the way, let's take a look at the differences in wmode. It summarizes the differences among several wmodes and their usage conditions:
Window is the default, window mode, cpu consumption is not serious
Transparent window-free mode
Opaque non-transparent window-free mode
The most efficient is the window mode.
Transparent use of transparent
When dynamic interaction (such as js) or window mode is not stable, opaque
If you drag window and transparent under the iframe of ie6, a screen-personal experience will appear.
In addition, the windowless mode consumes a large amount of resources, but ensures frame rate.