Solved

.php with javascript gotoAndPlay frame in flashmovie?

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
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 count occurrences of each item in an array.

757 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

19 Experts available now in Live!

Get 1:1 Help Now