Sign In | Register Now About Bytes | Help | Site Map
Connecting Tech Pros Worldwide

Can I wrap an <object> tag inside an <a> tag?

Question posted by: Alan Silver (Guest) on June 27th, 2008 07:15 PM
Hello,

I have an <objecttag that is used to display a Flash file. I would
like the whole Flash file to be a link. The obvious thought would be to
do this...

<a href="http://www.url.com"><object blah....>
</object></a>

....but this doesn't work.

Any ideas how to do this? I would rather do it in the HTML if I can. I
don't want to have to modify the Flash file if possible.

Thanks

--
Alan Silver
(anything added below this line is nothing to do with me)
Rik Wasmus's Avatar
Rik Wasmus
Guest
n/a Posts
June 27th, 2008
07:15 PM
#2

Re: Can I wrap an <object> tag inside an <a> tag?
On Thu, 15 May 2008 21:50:58 +0200, Alan Silver
<alan-silver@nospam.thanx.invalidwrote:
Quote:
Hello,
>
I have an <objecttag that is used to display a Flash file. I would
like the whole Flash file to be a link. The obvious thought would be to
do this...
>
<a href="http://www.url.com"><object blah....>
</object></a>
>
...but this doesn't work.
>
Any ideas how to do this? I would rather do it in the HTML if I can. I
don't want to have to modify the Flash file if possible.


Hmmm. You can try what happens if you position the ancher over the object
instead of around it (absolute positioning). I doubt it will work 100%
though, it may even depend on UA's implementation of Flash.
--
Rik Wasmus
....spamrun finished

Stanimir Stamenkov's Avatar
Stanimir Stamenkov
Guest
n/a Posts
June 27th, 2008
07:15 PM
#3

Re: Can I wrap an <object> tag inside an <a> tag?
Thu, 15 May 2008 20:50:58 +0100, /Alan Silver/:
Quote:
I have an <objecttag that is used to display a Flash file. I would
like the whole Flash file to be a link. The obvious thought would be to
do this...
>
<a href="http://www.url.com"><object blah....>
</object></a>
>
...but this doesn't work.
>
Any ideas how to do this? I would rather do it in the HTML if I can. I
don't want to have to modify the Flash file if possible.


You may try:

* Make sure you don't have any elements in the Flash which take
user input (mouse clicks, keyboard stokes);
* Apply 'wmode' [1] parameter with value of 'opaque' or
'transparent' to the object.

Alternatively you may try making the whole Flash object an active
link in the Flash object itself - you have to be able to produce the
Flash object yourself with that one.

[1] http://www.adobe.com/go/tn_12701

--
Stanimir

Alan Silver's Avatar
Alan Silver
Guest
n/a Posts
June 27th, 2008
07:15 PM
#4

Re: Can I wrap an <object> tag inside an <a> tag?
In article <op.ua74xvx65bnjuv@metallium.lan>, Rik Wasmus
<luiheidsgoeroe@hotmail.comwrites
Quote:
>Hmmm. You can try what happens if you position the ancher over the
>object instead of around it (absolute positioning). I doubt it will
>work 100% though, it may even depend on UA's implementation of Flash.


Thanks for the suggestion, but the end code is to be published for
others to add to their sites, and I can just see that this is going to
fail miserably!

Thanks anyway, any other suggestions.
Alan

--
Alan Silver
(anything added below this line is nothing to do with me)

Alan Silver's Avatar
Alan Silver
Guest
n/a Posts
June 27th, 2008
07:15 PM
#5

Re: Can I wrap an <object> tag inside an <a> tag?
In article <g0j2lr$8g8$1@registered.motzarella.org>, Stanimir Stamenkov
<s7an10@netscape.netwrites
<snip>
Quote:
>You may try:
>
* Make sure you don't have any elements in the Flash which take user
>input (mouse clicks, keyboard stokes);
* Apply 'wmode' [1] parameter with value of 'opaque' or 'transparent'
>to the object.


That was my first attempt (after the plain old <objectinside the <a>
approach), but it didn't work.
Quote:
>Alternatively you may try making the whole Flash object an active link
>in the Flash object itself - you have to be able to produce the Flash
>object yourself with that one.


I tried that, but FireFox gave a security warning when I clicked on the
movie. That's why I was hoping to do it in HTML.

Out of interest, I'm puzzled as to why I got a security warning, as I
seem to remember having these sorts of actions inside Flash movies
before, and not getting warnings. Any idea?

Thanks for the reply. Any other suggestions?
Alan

--
Alan Silver
(anything added below this line is nothing to do with me)

 
Not the answer you were looking for? Post your question . . .
189,759 Experts ready to help you find a solution.
Sign up for a free account, or Login (if you're already a member).

Latest Articles: Read & Comment
  • Didn't find the answer you were looking for?
    Post Your Question
  • Top Community Contributors