PDA

View Full Version : send flash to php



neograficos
January 2nd, 2004, 01:32 AM
hello, happy new year! :P

i want to know, i have a video.swf in a page,
and when the video finish, it go to another url,

www.site.com/index.html <----- video.swf

it redirect to www.site.com/index.php

how can i put the video in the index.php, and send 1 variable via post, so when it finish send to the same url that he are but with a varible, and them in php i look this variable and show the page:esmirk:

eyezberg
January 2nd, 2004, 07:39 AM
could you make that a little bit easier to understand?

pom
January 2nd, 2004, 07:53 AM
getURL at the end of the first swf maybe?

neograficos
January 2nd, 2004, 08:06 AM
ah, sory but i dont understand, i want that when the video finish send a variable saying that the video finish, using post, and in the file index.php i would see the variable and show the page no the video

example of my index.php:

<?
if(!$_POST['variable']){

?>
<OBJECT
style="WIDTH: 210px; HEIGHT: 154px; W: //download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#veIDTH: 147px"
codeBase=httprsion=5,0,0,0 height=154 width=210 align=right
classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000>
<PARAM NAME="_cx" VALUE="5398">
<PARAM NAME="_cy" VALUE="4075">
<PARAM NAME="FlashVars" VALUE="">
<PARAM NAME="Movie" VALUE="http://localhost:8080/mos/scripts/mm.swf">
<PARAM NAME="Src" VALUE="http://localhost:8080/mos/scripts/mm.swf">
<PARAM NAME="WMode" VALUE="Window"><PARAM NAME="Play" VALUE="-1">
<PARAM NAME="Loop" VALUE="-1"><PARAM NAME="Quality" VALUE="High">
<PARAM NAME="SAlign" VALUE=""><PARAM NAME="Menu" VALUE="-1">
<PARAM NAME="Base" VALUE=""><PARAM NAME="AllowScriptAccess" VALUE="always">
<PARAM NAME="Scale" VALUE="ShowAll"><PARAM NAME="DeviceFont" VALUE="0">
<PARAM NAME="EmbedMovie" VALUE="0"><PARAM NAME="BGColor" VALUE="FFFFFF">
<PARAM NAME="SWRemote" VALUE=""><PARAM NAME="MovieData" VALUE="">
<PARAM NAME="SeamlessTabbing" VALUE="1">
<embed src="ubicacion/nombre"
quality=high
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"
type="application/x-shockwave-flash" width="886" height="533" align="middle"
bgcolor="#000000"> </embed></OBJECT>
} else {?>

<?
my page
}
?>// please use the code tags next time //pom

norie
January 2nd, 2004, 09:06 AM
Originally posted by neograficos
// please use the code tags next time //pom

:P

I don't understand you either. How are you loading the video? What pom is saying is on the last frame of your movie use getURL:


getURL("mypage.php?variable=poo");

senocular
January 2nd, 2004, 09:48 AM
you can send Flash variables via query string in its object/embed:


<PARAM NAME=movie VALUE="mymovie.swf?variable=<?php echo $_POST['variable']; ?>">
<EMBED src="mymovie.swf?variable=<?php echo $_POST['variable']; ?>" etc...>

This will then be defined in the _root timeline of the movie. After the video is done, you can then reference it and use it as needed.


// last frame of movie
getURL("thispage.php?variable="+_root.variable);

...or however you need to use it