Solved

.php with javascript gotoAndPlay frame in flashmovie?

Posted on 2004-04-13
3
444 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
  • 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

911 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now