Solved

.php with javascript gotoAndPlay frame in flashmovie?

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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses how to implement server side field validation and display customized error messages to the client.
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.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

691 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