Solution Idea:
Because the Flash in the Web page is in the form of a control and has a higher priority, it is not valid to link directly to it, but it can be implemented with button control buttons.
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= "window.open (' http://www.flash8.net ', ' _blank ')" hidefocus>
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase= "http://download.macromedia.com/pub/ "Width=" height= "shockwave/cabs/flash/swflash.cab#version=6,0,29,0" >
<param name= "movie"
Value= "http://www.flash8.net/images/head/bbs.swf" >
<param name= "wmode" value= "Opaque" >
<param name= "Quality" value= "High" >
<embed src= "http://www.flash8.net/images/head/bbs.swf"
Quality= "High"
"Http://www.macromedia.com/go/getflashplayer" type= "Application/x-shockwave-flash" width= "pluginspage=" height = "Wmode=" "Opaque" ></embed>
</object>
</button>
2. The code in Method 1 runs after the button is clicked, the Flash in the button has a sinking action, if you want to cancel this action, you can disable the button's interactivity, and then use the standard a tag to do the link, the code is as follows:
<a href= "http://www.flash8.com" Hidefocus><button disabled style= "Width:225;height:76;border:none" >
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase= "http://download.macromedia.com/pub/ "Width=" height= "shockwave/cabs/flash/swflash.cab#version=6,0,29,0" >
<param name= "movie"
Value= "http://www.flash8.net/images/head/bbs.swf" >
<param name= "wmode" value= "Opaque" >
<param name= "Quality" value= "High" >
<embed src= "http://www.flash8.net/images/head/bbs.swf" quality= "High"
"Http://www.macromedia.com/go/getflashplayer" type= "Application/x-shockwave-flash" width= "pluginspage=" height = "Wmode=" "Opaque" ></embed>
</object>
</button>
</a>
Note: The Wmode property value of the Flash object must be set to Opaque.
Tip: In Method 1, the _blank parameter of the second line of code can be removed or modified to _self to allow the link to open in the current window.
Special Tips
When the code is run, click on Flash to open the URL specified in the code (Figure 5.1.9).
Figure 5.1.8 Add link functionality to Flash
Special note
This example solves the problem by taking advantage of the Wmode property of the Flash object and the feature of the button label. Set the Wmode property value of the Flash object to opaque to reduce the priority of the Flash object, and then use the button label to render the Flash object as a button so that you can resolve the problem by setting the style or event of the button object.
Http://fzlshop.com Menu
The second method:
Speaking of which, someone might say, that's not easy, the direct use of flash in ActionScript URL method is not done, so if our UI staff design flash, but the corresponding link in flash is not determined or later will change how to do? What I need is the ability to modify the link in the external flash accordingly.
That directly in the flash of the object element outside the add <a></a> tag to control the line, some people may think so, the idea is correct, but not workable. Oh, how to do? Baidu first, hehe, really admire some people's cow brain, true cow, the following is a solution:
First of all, we must first insert flash. Because, flash defaults to the highest level. So, I often meet flash to block the drop down menu.
Put the flash file in a layer, set to the bottom, flash set to transparent.
Copy Code code as follows:
<div style= "Z-index:-1" > <!--1. Set Flash to the bottom-->
<object classid= "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
Codebase= "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0"
Width= "height=" >
<param name= "movie" value= "media.swf" >
<param name= "Quality" value= "High" >
<embed src= "media.swf" quality= "High"
Pluginspage= "Http://www.macromedia.com/go/getflashplayer"
Type= "Application/x-shockwave-flash" width= "200"
height= "></embed>"
<param name= "wmode" value= "Transparent" >
<!--2. Flash must be set to transparent-->
</object> </div>
The next step is to add another layer to the flash layer,
Flash itself can not directly add onclick. And so on, so, can only use other things. is to add a transparent layer to the flash,
Copy Code code as follows:
<div id= "Huilayer" style= "Cursor:hand; Position:absolute;
left:10px; top:10px; width:200px; height:115px; Z-index:1;
visibility:visible; " ><a href= "Http://www.jb51.net" >
Border= "0" ></a></div>
Forum above, given a number of solutions, is to add a transparent layer, but if the light has a transparent layer, still can not accept the event.
To be more exact, part of it can, part of it can't, and the part of the flash part of the overlap does not work.
Why not? To tell the truth, I don't know, I was experimenting ...
When I set the background color of this layer to any one, not transparent, I found it. Can accept the event, add a
Super connection, or you can ... However, this is not the result we want, because the entire "exquisite" flash to cover the. So, there are Src= "Kong.gif" width= "height=" border= "0" >
I used Photoshop to make a transparent picture kong.gif
Size can be, but must be transparent! So as not to cover up the flash below.
Tried it ... It worked... Click Flash. is actually hit the flash top of the transparent picture kong.gif
Pictures, you can accept a lot of events, OnClick, onmouseover, onmosueout ...
It's easy to add a <a></a> hyperlink to a picture. At this time, the above problems are not solved, the incident to kong.gif accept!
Click the event, <div onclick= "OK ()" id= "Huilayer" ...
Whether it is by train, or fly aircraft, the new year will have to go home, so the method is still some, flash itself also provides a method, quite easy to use, is inside the flash through the Fscommand call external script, personally think this method simple and practical, controllable ability, specific usage, Not here to say, you search the Internet Fscommand key word will ah to many instances, but there is a hint: in the JavaScript version of the call method, it is best to provide a version of VBScript, otherwise the call may not be successful.