PDA

View Full Version : LoadMovie using php variables



mid-ori
March 23rd, 2004, 05:55 AM
Hi,

Not sure how to explain this one. however let me try.

My file structure is as follows:

video/bromford/header_video.flv
video/showreel/header_video.flv
video/sydney/header_video.flv

and in my index page i have the following php code


<?php
$folder = showreel;
?>

and in flash the following AS


myVideo_nc = new NetConnection();
myVideo_nc.connect(null);
newStream_ns = new NetStream(myVideo_nc);
videoHolder.attachVideo(newStream_ns);
newStream_ns.play(loadMovieNum("video/"+folder+"/header_video.flv",0));


this way i thought i would be able to load a different flv into the same swf by just changing the variable on the index page, for example


<?php
$folder = sydney;
?>

would load in this file "video/sydney/header_video.flv"

but its not working anybody have any ideas?

kill.robot.kill
March 23rd, 2004, 11:15 AM
are you printing your results for the php pages to the screen?

<?php
$folder = sydney;
print "&folder=$folder";
?>
This way if you actually go to that php page, in your browser it should say "&folder=sydney" on the page (minus quotes).
If they aren't on the screen, flash won't be able to read them.

mid-ori
March 24th, 2004, 05:03 AM
cheers, i've got it working another way, i'll post it up later, but i think the reason this didn't work is because of loading in a flv.