Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

embed flash in a href help

Status
Not open for further replies.

sandeepmur

Programmer
Dec 14, 2003
295
PT
Hello,

I want embed a flash movie within anchor tags.. something like:

<a name="jogo" id="jogo" href=" target="_blank">
<div id="Layer1" style="position:absolute; left:137px; top:40px; width:72px; height:42px; z-index:1">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase=" width="267" height="119">
<param name="movie" value="jogologica.swf">
<param name="quality" value="high">
<embed src="jogologica.swf" quality="high" pluginspage=" type="application/x-shockwave-flash" width="267" height="119"></embed></object>
</div>
</a>

but the above doesnt work... thnx for any suggestions.

sg
 
do you have a link to the page?

you *could* use Javascript, but that violates the fundamental rule that you cannot rely on Javascript alone...

--Chessbot
 
yes.. but is what I have above is correct ? can I embed a flash movie within a anchor tag ?

thnx
 
I had already tried the code without the anchor as per the link provided but its of no help..
 
It probably doesn't like having a <div> inside a <a>. Try swapping the order of those tags, i.e.
Code:
<div id="Layer1" style="position:absolute; left:137px; top:40px; width:72px; height:42px; z-index:1"> 
<a name="jogo" id="jogo" href="[URL unfurl="true"]http://www.xpto.com/index.html"[/URL] target="_blank">
  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="[URL unfurl="true"]http://download.macromedia.com/pub/shockwave/cabs/..."[/URL] width="267" height="119">
    <param name="movie" value="jogologica.swf">
    <param name="quality" value="high">
    <embed src="jogologica.swf" quality="high" pluginspage="[URL unfurl="true"]http://www.macromedia.com/go/getflashplayer"[/URL] type="application/x-shockwave-flash" width="267" height="119"></embed></object>
</a>
</div>

-- Chris Hunt
 
Tried that too.. In fact, tried locating the anchor tags just about at every line in the code above but is simply doesnt work..

Cant understand why the cursor style doesnt change Hand when I move the mouse over the flash..

Does the onlick event built into flash or something ? i hv very little knowledge bout flash..

thnx
 
the only way to overcome this is give the link in flash, no tags surrounding it would work...

Known is handfull, Unknown is worldfull
 
@vbkris,

Can you please explain that !? Isnt there any simple workaround ??

TIA
 
What you are trying to do is not possible.

Flash is an ActiveX control. The link must reside within the flash movie not on the control itself.

If you do not have the source file for the flash movie you may be able to create a transparent .gif (button) and absolutely position it over the flash movie, but you will need to be sure to set the z-index of the flash movie div lower than the button. (I'm not even sure that will work but it's a theory).

Ideally you would simply add a button to the flash movie (using Flash) that does what you require. Which I believe is what vbkris was saying.

Hope it helps!

Wow JT that almost looked like you knew what you were doing!
 
hi guys,

Thnx for all the info.. The flash developer finally understood what I wanted and did what was needed i.e. configure the link within the flash movie BUT the problem has not gone away.. The flash movie with the link works great in my machine but doesnt on the server !!! :(

& yes, I hv uploaded the correct flash movie.. :(

Why is this happening !? heres the link:

thnx,
 
Hi again,

THe problem was with the cache and its ok now But still have another problem which I had reported earlier..

When the flash in the link is clicked, a new page opens up which has an iframe in it and loads a app from another server.

But when I try to log in, the page simply refreshed instead of proceeding to the next page !! If I use the link directly in the browser it works fine..

I thought app within a iframe function just fine..

any workaround ?

thnx
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top