PHP embeds FLASH ---> load variables from PHP ----> redirects to correct
page.
If FLASH wouldn't load, then javascript or a http refresh header would
send them elsewhere.
I'm trying to use Ming to eliminate the load variables from PHP
portion. That way once the FLASH file loads, it will redirect, and you
won't have to wait for the program to go to the server and load more
variables. Here is the code I'm using:
<brokencode>
<?php
// $load is a variable that is passed in the embed tag ex:
// <embed src=detectflash.php?load=<?=$PHP_SELF?>>
$thisURL = "$load?hasflash=yes";
Ming_setScale(1.0);
// Create a very small movie with a white background.
$m = new SWFMovie();
$m->setBackground(0xff, 0xff, 0xff);
$m->setDimension(18, 18);
// This movie simply redirects to the appropriate page.
$m->add(new SWFAction("getURL('$thisURL', ''); stop();"));
$m->nextFrame();
$m->add(new SWFAction("play();"));
header('Content-type: application/x-shockwave-flash');
$m->output();
?>
</brokencode>
So far I've tested this in 3 browsers all on Windows 2000.
IE5 - works just fine.
Opera 5 - works just fine.
Netscape 4.08 - Never redirects.
I added code to write $thisURL to a file so I could see if it is getting
passed correctly, and it is. So there must be a problem with the movie
somewhere. In the getURL() function, I have tried many different things
for the second argument. _self, _parent, _top. None of these makes any
difference. Anyone have any ideas I could try??
--
Jason Stechschulte
University of Northwestern Ohio
jps...@unoh.edu
(419)998-3108
--
When it's dark enough you can see the stars.
-- Ralph Waldo Emerson,
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general...@lists.php.net
For additional commands, e-mail: php-gene...@lists.php.net
To contact the list administrators, e-mail: php-lis...@lists.php.net
>I added code to write $thisURL to a file so I could see if it is getting
>passed correctly, and it is. So there must be a problem with the movie
>somewhere. In the getURL() function, I have tried many different things
>for the second argument. _self, _parent, _top. None of these makes any
>difference. Anyone have any ideas I could try??
Try _level0 - that's what you'd need to replace the current movie.
Alternately, you can avoid needing to load Flash at all - use JavaScript to
iterate over the plugins array on Netscape and use VBScript with an On Error
handler to instantiate the Flash ActiveX control - if it fails, your VBScript
can assume Flash isn't installed (which is the sane default).
I forgot to mention that I've also tried the different _level* arguemnts
too. _level0 actually breaks IE and still doesn't work in Netscape.
> Alternately, you can avoid needing to load Flash at all - use JavaScript to
> iterate over the plugins array on Netscape and use VBScript with an On Error
> handler to instantiate the Flash ActiveX control - if it fails, your VBScript
> can assume Flash isn't installed (which is the sane default).
I guess I will just have to implement this solution. I was hoping to do
it using Ming just to help familiarize myself with it, but this will
probably be more efficient than how it is being done today.
--
Jason Stechschulte
jps...@unoh.edu
--
If you consistently take an antagonistic approach, however, people are
going to start thinking you're from New York. :-)
-- Larry Wall to Dan Bernstein in <10...@jpl-devvax.JPL.NASA.GOV>