Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript How-To
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 12th, 2005, 10:15 PM
Registered User
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to hijinn Send a message via MSN to hijinn Send a message via Yahoo to hijinn
Default I cant get my flash button to open one of my links

I made this button, but i can't get it to open one of the links it should. my works are in .php extension.

My code: onClick="window.open('Bautismo.php')"

but it doesnt do it
if like the button never existed.

 
Old December 13th, 2005, 12:47 AM
Authorized User
 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
First: "my works are in .php", do you that the file you are writing is name for exemple name.php, if so, you should have in your php file:

<?
echo "<form><input type=button value=button onClick=\"window.open('Bautismo.php')\"></form>"
?>

-----------------------------------------------------------
Seconde: if your file is an html file for exemple name.htm then you should write in it:

<html>
<body>
<form>
<input type=button value=button onClick="window.open('Bautismo.php')">
</form>
</body>
</html>

----------------------------------------------
I would like to ask you what program are you using as a php server on your computer?



 
Old December 13th, 2005, 01:25 AM
Registered User
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to hijinn Send a message via MSN to hijinn Send a message via Yahoo to hijinn
Default

im using xammp


 
Old December 13th, 2005, 01:30 AM
Registered User
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to hijinn Send a message via MSN to hijinn Send a message via Yahoo to hijinn
Default

the thing is that i created the button and, i used the object classid=xxxxx, onclick=++++++



 
Old December 13th, 2005, 01:39 AM
Registered User
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to hijinn Send a message via MSN to hijinn Send a message via Yahoo to hijinn
Default

this is the code im using:
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="250" height="170" onClick=\"window.open('Bautismo.php')\">
    <param name="movie" value="bapt1.swf">
    <param name="quality" value="high">
    <embed src="bapt1.swf" width="250" height="170" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
  </object>

 
Old December 13th, 2005, 03:18 AM
Authorized User
 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This could help for the moment (i am searching for layers or iframes) : it works by making the event onMouseOver=..., without / before " :

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="250" height="170" onMouseOver="window.open('Bautismo.php')">
    <param name="movie" value="bapt1.swf">
    <param name="quality" value="high">
    <embed src="bapt1.swf" width="250" height="170" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>
 
Old December 13th, 2005, 09:26 AM
Authorized User
 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I found a method with layers(and tried it), it isn't hard, i hope that it will help.I will

explain then give the source and a transparent .swf file.

FIRST: There will be tow files.swf (bapt1.swf & tr.swf), and they will be

superposed, BUT, it will depend on the screen resolution to place the object, because the

exact place on the screen will be specified as distance from TOP or LEFT...

SECOND: The tr.swf is a transparent .swf file that has a programed onClick button

to Bautismo.php, it will be the overall layer (top layer), BUT it will prevent to click on

your flash file, so i hope that your is a movie flash file, and not an interactive flash

file.

THIRD: Code :
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" style="position: absolute; width: 250px; height: 170px; z-index: 2; [u]left: 500; top: 87</u>" id="LayerTop">
    <param name="movie" value="tr.swf">
    <param name="MouseEventsEnabled" value="1">
    <param name="quality" value="high">
    <param name="wmode" value="transparent" />
    <embed src="tr.swf" width="250" height="170" wmode="transparent" quality="high"
pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" style="position: absolute; width: 250px; height: 170px; z-index: 1; [u]left: 500; top: 88</u>" id="LayerBottom">
    <param name="movie" value="bapt1.swf">
    <param name="quality" value="high">
    <param name="wmode" value="transparent" />
    <embed src="bapt1.swf" width="250" height="170" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
</object>
in bold : what ihave added
in italic : transparency for your bapt1.swf file
in underline : to change the position of the tow objects or files

FOUR: LINKS:
http://www.rissala.shajara.net/p2p/t.htm :
a test page to show how it works (just the flash file)
http://www.rissala.shajara.net/p2p/bapt1.swf :
the transparent flash bapt1.swf file
http://www.rissala.shajara.net/p2p/tr.swf :
the transparent flash tr.swf file
http://www.rissala.shajara.net/p2p/tr.fla :
the transparent tr.fla file
http://www.rissala.shajara.net/p2p/button.rar :
the files t.htm tr.swf tr.fla bapt1.swf in a rar file
http://www.rissala.shajara.net/p2p/button.zip :
the files t.htm tr.swf tr.fla bapt1.swf in a zip file
http://www.rissala.shajara.net/p2p/button.exe :
the files t.htm tr.swf tr.fla bapt1.swf in a zip self-extract file.


FIVE: Sorry for the very long message, i ask God that it will help you.
 
Old December 13th, 2005, 04:40 PM
Registered User
 
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to hijinn Send a message via MSN to hijinn Send a message via Yahoo to hijinn
Default

Thanks, the first one worked, Be blessed.

 
Old December 14th, 2005, 04:13 PM
Authorized User
 
Join Date: Dec 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are welcome, Thank you,






Similar Threads
Thread Thread Starter Forum Replies Last Post
Issues with flash button neil.abachi07 Flash (all versions) 0 February 28th, 2007 12:31 PM
flash button angelboy C# 2005 0 February 23rd, 2007 01:27 AM
Site relative links will not work in flash movies? themonk Dreamweaver (all versions) 0 December 23rd, 2003 06:42 AM
links to a page when a button is clicked hosefo81 HTML Code Clinic 4 December 7th, 2003 06:47 AM
how flash button open html file mateenmohd Flash (all versions) 1 August 7th, 2003 06:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.