Solved

.php with javascript gotoAndPlay frame in flashmovie?

Posted on 2004-04-13
3
448 Views
Last Modified: 2008-02-01
hi everyone,

i am struggling with the following thing.
I would like to "redirect" certain visitors to a named frame in a flashmovie using
.php and javascript.

i got it working to the point that if a variable is true, a link appears above the flash file.
when user clicks on this link, the movie goes to a frame named "login".

oke so far, so good. but this is an ugly solution, i would really want to hide this part en
redirect the visitor while loading the page, without having to click on a link,
but i can't get this working...

anyone with ideas?

thanks in advance,

derek

code:

<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html;  charset=">
<TITLE>flash_realty</TITLE>
<?
if ($string=="yes"){
echo "<center>";
echo "<A href=\"javascript:document.flash_realty.TGotoLabel('/','login');document.flash_realty.Play()\">$lang_see</A>";
echo "</center>";
echo "<br>";
}
?>
</HEAD>
<BODY bgcolor="#FFFFFF">
<!-- URL's used in the movie-->
<!-- text used in the movie-->
<!--<P ALIGN="LEFT">OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
 codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
 WIDTH="500" HEIGHT="570" id="flash_realty" ALIGN="">
 <PARAM NAME=movie VALUE="flash_realty.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="flash_realty.swf" quality=high bgcolor=#FFFFFF  WIDTH="500" HEIGHT="570" NAME="flash_realty" SWLIVECONNECT="true" ALIGN=""
 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT><br><br>

</script>
</BODY>
</HTML>
0
Comment
Question by:dwax
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 12

Expert Comment

by:venkateshwarr
ID: 10813176
you can redirect to a page like this..

<?
if ($string=="yes")
{
header("Location: ________");
}
?>

for example
header("Location: http://www.google.com/"); /* Redirect browser */

I did not understand your javascript....
In any case if you want to get redirected from javascript .... you can do something like this.

<?php
if ($string=="yes"){
echo "<script>";
echo "document.flash_realty.TGotoLabel('/','login'); \n";
echo "document.flash_realty.Play(); \n";
echo "</script>";
}
?>
0
 

Author Comment

by:dwax
ID: 10814009
thanks venkateshwarr,

it works like  a charm! my javascript-skills are close to zero...
i was so dumb to put the script in the head, but it only works after the
embedded flash file.

well, thanks again
0
 
LVL 12

Accepted Solution

by:
venkateshwarr earned 250 total points
ID: 10825022
you are welcome
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question