Urgent Youtube Help Required!

Status
Not open for further replies.

mediastar100

New member
Apr 26, 2008
1,443
12
0
Hey Guys

Ive been trying to do this for ages with no luck.

How can I make a youtube video I am running on my site click not to youtube but to another destination url?

any help really appreciated - im on a timer here!!!

Cheers
 


HTML:
<div onclick="location.href='http://www.example.com';" style="cursor:pointer;"><!-- youtube video here --></div>
should do the trick, though untested.

Making that work relies on autoplay since when they click the video to
play, it will actually launch your link. If you don't want to autoplay,
then a snapshot will do the same thing without any tomfoolery
 
You could do something like this. Make a transparent png the width and 25px shorter than the video. This will cover all but the controls at the bottom. When you hover over the youtube logo at the bottom right of the video the logo highlights, but if you click it will go to your url.

HTML:
<style>
.trans {
    position:absolute;
    top:0;
    left:0;
    border:none;
}
</style>
<div>
<a href="http://www.wickedfire.com"><img src="transparent.png" class="trans"></a>
<!-- insert youtube embed -->
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/g8N0mRQNxB4&hl=en&fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/g8N0mRQNxB4&hl=en&fs=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object>
</div>
 
cheers for the help guys - my good friend Bobsoap came to the rescue in the end.

PHP magician extrodinaire!

Dave
 
yeah man - well as much as i understand anyway - the video was ripped and then uploaded as flash with a transparent div included. The video must auto play as Erect said in order to make sure that any click on the video is directed to the next page.

not exactly an explanation but thats as much as I understand
 
You can ask or make friend with the video owner and they will give you access for it. Since we know that youtube video owners are copyrighter. J Then you can do whatever you want with the video. If you just get it. It will be deleted soon. :D
 
yeah man - well as much as i understand anyway - the video was ripped and then uploaded as flash with a transparent div included. The video must auto play as Erect said in order to make sure that any click on the video is directed to the next page.

not exactly an explanation but thats as much as I understand

so ... how far was my 2 second javascript hack off? Sounds pretty damn close to your final answer.

Any chance you could post the html to help future visitors?
 
Status
Not open for further replies.