Flash and php params exchange -


hello new flash, , trying make simple video player. have problem setting source of video: in action script have this:

player.source='http://localhost/getvideo.php'; 

where getvideo.php is:

<?php echo file_get_contents('sas.mp4'); ?> 

this works fine when try add parameters player.source:

player.source='http://localhost/getvideo.php?asd=asdas'; 

i error:

videoerror: 1005: invalid xml: url: "http://localhost/getvideo.php?asd=asdas&flvplaybackversion=2.1" no root node found; if url flv must have .flv extension , take no parameters 

what want is, create player can parametrize video select. 1 knows fast solution this? thanks

you can't attach parameters source url that. couldn't find in documentation, makes sense restrict url strings when considering opening video file via flvplayback not equal simple url request on loader object, rather involves opening netconnection, , starting , attaching netstream, possibly not on http (which invalidate urls parameters, anyway): component not meant other things - , preventing misuse (even having dedicated error message) makes sure works expected.

having looked around bit, seems can use netstream.play in conjunction urlrequest, might possible add parameters using urlrequest.data . haven't tried this, though. flvplayback's nested videoplayer allows attach own stream.

another solution start simple urlrequest first, , have parameterized php script return result path actual flv movie, pass player.source.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -