PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
Tompa
Forum Newbie
Posts: 10 Joined: Thu Mar 20, 2008 12:40 pm
Post
by Tompa » Tue Mar 25, 2008 1:47 pm
Hi,
I have this problem with a flashbutton I have made. I need to link this (when clicked) to a newtopic page in my forum.
Code: Select all
$actions.="<object onClick='location.href=('http://www.bluefire-studio.com/index.php?site=forum&addtopic=true&board=".$board."')' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='60' height='20'>
<param name='movie' value='site_images/forum_buttons/new_topic.swf'>
<param name='quality' value='high'>
<embed src='site_images/forum_buttons/new_topic.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='60' height='20'></embed></object>";
The problem is this. onClick function doesnt work? have I done anything wrong or is there any other way to make this link? <a href=""> doesnt work with objects...
flying_circus
Forum Regular
Posts: 732 Joined: Wed Mar 05, 2008 10:23 pm
Location: Sunriver, OR
Post
by flying_circus » Tue Mar 25, 2008 2:04 pm
Remove the ( and )'s around your link.
Code: Select all
$actions.="<object onClick='location.href='http://www.bluefire-studio.com/index.php?
site=forum&addtopic=true&board=".$board."'' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='60' height='20'>
<param name='movie' value='site_images/forum_buttons/new_topic.swf'>
<param name='quality' value='high'>
<embed src='site_images/forum_buttons/new_topic.swf' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='60' height='20'></embed></object>";
Tompa
Forum Newbie
Posts: 10 Joined: Thu Mar 20, 2008 12:40 pm
Post
by Tompa » Tue Mar 25, 2008 2:13 pm
still doesnt work =/
flying_circus
Forum Regular
Posts: 732 Joined: Wed Mar 05, 2008 10:23 pm
Location: Sunriver, OR
Post
by flying_circus » Tue Mar 25, 2008 5:00 pm
Sorry, I just did a once over of your code, didnt load it up and run it. I see what you mean it is not working. I've tried wrapping it in a div and then also tried putting a div over top of the object and it doesnt work. Can you make it do what you need by using an onclick event inside of flash (actionscript)?
kishanprasad
Forum Newbie
Posts: 16 Joined: Mon Feb 25, 2008 5:20 pm
Post
by kishanprasad » Tue Mar 25, 2008 8:07 pm
put like onlcik='loatation.href=/'URl/'';
(or)
put a js fn like
onlcik='navigate(url)'
so that u can write that stuff there in the fn