# Displaying Flash within an \<a\>\</a\> tag

**URL:** <https://forum.kirupa.com/t/displaying-flash-within-an-a-a-tag/25883>\
**Category:** flash\
**Created:** [July 17, 2003, 9:55am UTC](https://forum.kirupa.com/t/displaying-flash-within-an-a-a-tag/25883 "2003-07-17T09:55:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![philmwebb](https://avatars.discourse-cdn.com/v4/letter/p/53a042/32.png) [@philmwebb](https://forum.kirupa.com/u/philmwebb)\
**Post date:** [July 17, 2003, 9:55am UTC](https://forum.kirupa.com/t/displaying-flash-within-an-a-a-tag/25883/1 "2003-07-17T09:55:51Z")

</div>

I want to include a small swf file within an href link on my site and have the link activated when the user clicks on the swf as well as on additional text. However, just putting the OBJECT and EMBED tags as generated from Flash with the \<a\> tag doesn’t work.

I know some folks would say, well just put an action in the SWF to handle the click event and then navigate to your URL, but the URL will be dynamic based on the generated ASP page. Any ideas? Here’s my HTML code:

```php
<a target='candlcart' href='doorcart.asp?action=add&doorid=1&glassid=2'>
<<Add door to cart

<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/
shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
WIDTH="50" HEIGHT="50" id="AddToCart" ALIGN="">
<PARAM NAME=movie VALUE="AddToCart.swf"> <PARAM NAME=quality VALUE=high>
<PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE="#FFFFFF">

<EMBED src="AddToCart.swf" quality=high bgcolor="#FFFFFF"
WIDTH="50" HEIGHT="50" NAME="AddToCart" ALIGN=""
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"
</EMBED>

</OBJECT>

</a>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 17, 2003, 10:46am UTC](https://forum.kirupa.com/t/displaying-flash-within-an-a-a-tag/25883/2 "2003-07-17T10:46:45Z")

</div>

dammit … just put the whole path in the “a” tag

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 17, 2003, 10:55am UTC](https://forum.kirupa.com/t/displaying-flash-within-an-a-a-tag/25883/3 "2003-07-17T10:55:37Z")

</div>

Not sure what you mean by putting the whole path in the \<a\> tag? Do you mean putting all the OBJECT stuff actually in the href attribute of \<a\>? Can’t see how that could work. Could you post an example of what you mean? Use the PHP tags in the post to include code.

Thanks,  
Phil

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 17, 2003, 11:12am UTC](https://forum.kirupa.com/t/displaying-flash-within-an-a-a-tag/25883/4 "2003-07-17T11:12:53Z")

</div>

i mean put the whole path for the ASP or PHP between the “a” tag … i remember i had this one and it worked fine, with PHP, CGI, BIN and ASP … i am sorry i dont have the link anymore.

put "[http://www](http://www). … all path for the ASP
