Ming and flash detection

From: Date: Mon, 02 Apr 2001 14:55:33 +0000
Subject: Ming and flash detection
Groups: php.general 
Request: Send a blank email to php-general+get-46621@lists.php.net to get a copy of this message
Hi, I'm having a problem writing a flash detector, and was hoping someone would help. I had one working that I created with Flash 4, but it would fetch another webpage after loading so that it knew where to redirect to. So it looked like: 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 jpstech@unoh.edu (419)998-3108 -- When it's dark enough you can see the stars. -- Ralph Waldo Emerson,

« previous php.general (#46621) next »