[SWFObject] Flash object as hyperlink

Aran Rhee aran.rhee at qdc.net.au
Wed Sep 20 06:50:43 PDT 2006


Hmmmm....Yes....

In my haste to post a solution to you, I didn't read/re-post my entire
original post thread properly :(  (and things tend to exit the brain after
non-use...). 

Checking back over my orig post (below) I see that like Geoff, I suggested
using another DIV with a link on that DIV (the onclick function was a way of
getting around having to have a gif etc on the top layer DIV).

I have not actually tested this though, as my preferred method would just to
have an invisible button inside the .swf which you can pass the URL value
you want via a swfObject add variable call.

Sorry for the confusion.

Aran

BTW - David, Thanks for your more in depth / cross browser supported post on
applying the link to the DIV. What you say is true, and what I was actually
meaning was make sure you have actually written the .swf Object successfully
(user had right swf version etc) before making a link. 


> -----Original Message-----
> From: swfobject-bounces at lists.deconcept.com
> [mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Aran Rhee
> Sent: Monday, 31 July 2006 2:24 PM
> To: swfobject at lists.deconcept.com
> Subject: Re: [SWFObject] Making the whole Flash file a link
> 
> Drew.
>
> > You could also do it with a layer above the flash using  <div> etc.
> 
> I think you might need a transparent GIF on top (or another flash file
> etc) to place the link on to. I could be wrong, but I don't think you 
> can't make a <DIV> or <td> etc a link.
> 
> You can do this though :)
> 
> <div onclick="javascript:location='http://some.com'" 
> id="linkdiv"> ... stuff goes here ...
> </div> 






 

> -----Original Message-----
> From: swfobject-bounces at lists.deconcept.com 
> [mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of 
> Dave Pollak
> Sent: Wednesday, 20 September 2006 10:27 PM
> To: swfobject at lists.deconcept.com
> Subject: Re: [SWFObject] Flash object as hyperlink
> 
> I tried Aran's solution but with the same effect that I got 
> when I simply surrounded the <div> with anchor tags. The 
> cursor changed to a link pointer and the link worked but only 
> on the blank space in the <div> not over the flash banner.
> 
> I don't know what it means to
> 
> make sure the flash has been written before applying the link 
> to your <div> .
> 
> 
> 
> Aran Rhee wrote:
> > Hi all.
> >
> > Back in July, I posted this solution to the same question. You can 
> > make the contents of a div a link like below. I used CSS to 
> change the 
> > cursor as expected on a link.
> >
> >
> > <style type="text/css">
> > 	div.linkdiv {cursor:pointer;}
> > </style>
> >
> > <body>
> > <div class="linkdiv" onclick="javascript:location='http://some.com'"
> > id="adiv"> ... stuff goes here ...
> > </div>
> > </body>
> >
> >
> > BTW - you might want to check to make sure the flash has 
> been written 
> > before applying the link to your <div>
> >
> >
> > Cheers,
> > Aran
> >
> >  
> >
> >   
> >> -----Original Message-----
> >> From: swfobject-bounces at lists.deconcept.com
> >> [mailto:swfobject-bounces at lists.deconcept.com] On Behalf Of Dave 
> >> Pollak
> >> Sent: Wednesday, 20 September 2006 5:08 AM
> >> To: swfobject at lists.deconcept.com
> >> Subject: [SWFObject] Flash object as hyperlink
> >>
> >> I've got swfobject working so my flash object displays 
> without  the 
> >> annoying 'click to activate...' tool tip however I also want the 
> >> object to be a hyperlink.
> >>
> >> I put anchor tags around the 'flashcontent' <div>. Blank 
> space within 
> >> the <div> is hyperlinked but the object itself is not. On 
> mouseover 
> >> of the object the cursor changes back to a pointer.
> >>
> >>
> >> _______________________________________________
> >> SWFObject mailing list
> >> SWFObject at lists.deconcept.com
> >> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
> >>     
> > _______________________________________________
> > SWFObject mailing list
> > SWFObject at lists.deconcept.com
> > http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
> >
> >
> >   
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com




More information about the Swfobject mailing list