Solution:
Because Flash in a web page appears in the form of a control and has a high priority, it is invalid to directly link it, but it can be implemented using the button control BUTTON.
Specific steps
1. Add the onClick event directly to the button to open the specified page:
<button style="width:225;height:76;border:none;background:transparent"
onClick="('http://','_blank')" hidefocus>
<object class codebase="/pub/shockwave/cabs/flash/#version=6,0,29,0" width="225" height="76">
<param name="movie"
value="http:///images/head/">
<param name="wmode" value="Opaque">
<param name="quality" value="high">
<embed src="http:///images/head/"
quality="high"
pluginspage="/go/getflashplayer" type="application/x-shockwave-flash" width="225" height="76" wmode="Opaque"></embed>
</object>
</button>
2. When the button is clicked after the code in Method 1 is run, the Flash in the button has a sinking action. If you want to cancel this action, you can prohibit the interactivity of the button and then use the standard A tag as a link. The code is as follows:
<a href="http://" hidefocus><button disabled style="width:225;height:76;border:none">
<object class codebase="/pub/shockwave/cabs/flash/#version=6,0,29,0" width="225" height="76">
<param name="movie"
value="http:///images/head/">
<param name="wmode" value="Opaque">
<param name="quality" value="high">
<embed src="http:///images/head/" quality="high"
pluginspage="/go/getflashplayer" type="application/x-shockwave-flash" width="225" height="76" wmode="Opaque"></embed>
</object>
</button>
</a>
Note: The wmode attribute value of the Flash object must be set to Opaque.
Tips: The _blank parameter in the second line of the code in Method 1 can be removed or modified to _self to allow the link to open in the current window.
Special reminder
After the code is run, click on Flash and the URL specified in the code will be opened (Figure 5.1.9).
Figure 5.1.8 Add link function to Flash
Special Note
The solution to this problem is mainly to utilize the wmode attribute of the Flash object and the BUTTON tag characteristics. Setting the wmode property value of the Flash object to opaque is to reduce the priority of the Flash object, and then using the BUTTON tag to render the Flash object into a button, so that the problem can be solved by setting the style or event of the BUTTON object.
menu
The second method:
Speaking of this issue, some people may say that it is not simple yet. You can just use the url method in flash ActionScript to solve it. So what if our UI staff has designed flash, but the corresponding link of flash has not been determined or will change in the future? What I need is to be able to modify the link corresponding to flash externally.
Then just add a <a></a> tag outside the object element where flash is located to control it. Some people may think so, but the idea is correct, but it won't work. Haha, what should I do? Let’s go to Baidu first, haha, I really admire some people’s awesome brains. It’s really awesome. Here is a solution:
First of all, we must insert FLASH first. Because Flash is the highest level by default. Therefore, I often encounter situations where Flash blocks the drop-down menu.
Put the Flash file into a layer, set it to the lowest layer, and set it to transparent.
<div style="z-index:-1"> <!--1.Set FLASH to the underlying layer-->
<object class
codebase="/pub/shockwave/cabs/flash/#version=6,0,29,0"
width="200" height="115">
<param name="movie" value="">
<param name="quality" value="high">
<embed src="" quality="high"
pluginspage="/go/getflashplayer"
type="application/x-shockwave-flash" width="200"
height="115"></embed>
<param name="wmode" value="transparent">
<!--2. FLASH must be set to transparent-->
</object> </div>
Next, add another layer to the FLASH layer.
Flash itself cannot directly add onclick and other events, so it can only use other things. Just add a transparent layer to FLASH.
<div style="cursor: hand; position:absolute;
left:10px; top:10px; width:200px; height:115px; z-index:1;
visibility: visible;"><a href="https://">
<img src="" width="200" height="115"
border="0"></a></div>
There are some solutions on the forum, which is to add a transparent layer. However, if there is a transparent layer, the event will still not be accepted.
To be more precise, part of it is OK, part of it is not OK, and part of it overlaps with FLASH cannot.
Why can't it work? To be honest, I don't know either. I've come up with experiments...
When I set the background color of this layer to any one, it is not transparent, I found that the event can be accepted, and I added a
Hyperconnection, it's OK.. But, this is not the result we want. Because, the whole "exquisite" FLASH is covered.. So, there is <img
src="" width="200" height="115" border="0">
I made a transparent picture with PhotoShop
Both sizes are OK, but they must be transparent! This way, the FLASH below will not be covered.
Experimented... Successfully... Click on FLASH. Actually, it hits the transparent picture on the upper layer of FLASH
Pictures can accept many events, onclick, onmouseover, onmosueout...
It is very simple to add a <a></a> hyperconnection to the picture... At this time, have all the above problems been solved and accept all the events!
Click event, <div onclick="ok()" ............
Whether you are taking a train or flying plane, you have to go home during the Chinese New Year, so there are still methods. Flash itself also provides a method, which is very useful, which is to call external scripts through FSCommand within Flash. I personally think this method is simple and practical, with strong controllability, so I won’t talk about the specific usage here. If you search for the FSCommand keywords online, you will get many instances. However, there is still a tip: when providing the javascript version of the call method, it is best to also provide a vbscript version, otherwise the call may not be successful.
Because Flash in a web page appears in the form of a control and has a high priority, it is invalid to directly link it, but it can be implemented using the button control BUTTON.
Specific steps
1. Add the onClick event directly to the button to open the specified page:
<button style="width:225;height:76;border:none;background:transparent"
onClick="('http://','_blank')" hidefocus>
<object class codebase="/pub/shockwave/cabs/flash/#version=6,0,29,0" width="225" height="76">
<param name="movie"
value="http:///images/head/">
<param name="wmode" value="Opaque">
<param name="quality" value="high">
<embed src="http:///images/head/"
quality="high"
pluginspage="/go/getflashplayer" type="application/x-shockwave-flash" width="225" height="76" wmode="Opaque"></embed>
</object>
</button>
2. When the button is clicked after the code in Method 1 is run, the Flash in the button has a sinking action. If you want to cancel this action, you can prohibit the interactivity of the button and then use the standard A tag as a link. The code is as follows:
<a href="http://" hidefocus><button disabled style="width:225;height:76;border:none">
<object class codebase="/pub/shockwave/cabs/flash/#version=6,0,29,0" width="225" height="76">
<param name="movie"
value="http:///images/head/">
<param name="wmode" value="Opaque">
<param name="quality" value="high">
<embed src="http:///images/head/" quality="high"
pluginspage="/go/getflashplayer" type="application/x-shockwave-flash" width="225" height="76" wmode="Opaque"></embed>
</object>
</button>
</a>
Note: The wmode attribute value of the Flash object must be set to Opaque.
Tips: The _blank parameter in the second line of the code in Method 1 can be removed or modified to _self to allow the link to open in the current window.
Special reminder
After the code is run, click on Flash and the URL specified in the code will be opened (Figure 5.1.9).
Figure 5.1.8 Add link function to Flash
Special Note
The solution to this problem is mainly to utilize the wmode attribute of the Flash object and the BUTTON tag characteristics. Setting the wmode property value of the Flash object to opaque is to reduce the priority of the Flash object, and then using the BUTTON tag to render the Flash object into a button, so that the problem can be solved by setting the style or event of the BUTTON object.
menu
The second method:
Speaking of this issue, some people may say that it is not simple yet. You can just use the url method in flash ActionScript to solve it. So what if our UI staff has designed flash, but the corresponding link of flash has not been determined or will change in the future? What I need is to be able to modify the link corresponding to flash externally.
Then just add a <a></a> tag outside the object element where flash is located to control it. Some people may think so, but the idea is correct, but it won't work. Haha, what should I do? Let’s go to Baidu first, haha, I really admire some people’s awesome brains. It’s really awesome. Here is a solution:
First of all, we must insert FLASH first. Because Flash is the highest level by default. Therefore, I often encounter situations where Flash blocks the drop-down menu.
Put the Flash file into a layer, set it to the lowest layer, and set it to transparent.
Copy the codeThe code is as follows:
<div style="z-index:-1"> <!--1.Set FLASH to the underlying layer-->
<object class
codebase="/pub/shockwave/cabs/flash/#version=6,0,29,0"
width="200" height="115">
<param name="movie" value="">
<param name="quality" value="high">
<embed src="" quality="high"
pluginspage="/go/getflashplayer"
type="application/x-shockwave-flash" width="200"
height="115"></embed>
<param name="wmode" value="transparent">
<!--2. FLASH must be set to transparent-->
</object> </div>
Next, add another layer to the FLASH layer.
Flash itself cannot directly add onclick and other events, so it can only use other things. Just add a transparent layer to FLASH.
Copy the codeThe code is as follows:
<div style="cursor: hand; position:absolute;
left:10px; top:10px; width:200px; height:115px; z-index:1;
visibility: visible;"><a href="https://">
<img src="" width="200" height="115"
border="0"></a></div>
There are some solutions on the forum, which is to add a transparent layer. However, if there is a transparent layer, the event will still not be accepted.
To be more precise, part of it is OK, part of it is not OK, and part of it overlaps with FLASH cannot.
Why can't it work? To be honest, I don't know either. I've come up with experiments...
When I set the background color of this layer to any one, it is not transparent, I found that the event can be accepted, and I added a
Hyperconnection, it's OK.. But, this is not the result we want. Because, the whole "exquisite" FLASH is covered.. So, there is <img
src="" width="200" height="115" border="0">
I made a transparent picture with PhotoShop
Both sizes are OK, but they must be transparent! This way, the FLASH below will not be covered.
Experimented... Successfully... Click on FLASH. Actually, it hits the transparent picture on the upper layer of FLASH
Pictures can accept many events, onclick, onmouseover, onmosueout...
It is very simple to add a <a></a> hyperconnection to the picture... At this time, have all the above problems been solved and accept all the events!
Click event, <div onclick="ok()" ............
Whether you are taking a train or flying plane, you have to go home during the Chinese New Year, so there are still methods. Flash itself also provides a method, which is very useful, which is to call external scripts through FSCommand within Flash. I personally think this method is simple and practical, with strong controllability, so I won’t talk about the specific usage here. If you search for the FSCommand keywords online, you will get many instances. However, there is still a tip: when providing the javascript version of the call method, it is best to also provide a vbscript version, otherwise the call may not be successful.