Page 1 of 1

FlashVar function how to insert variables

Posted: Sat Oct 17, 2009 7:34 pm
by crison22
<embed
src='player-viral.swf'
width='263'
height='220'
bgcolor='undefined'
allowscriptaccess='always'
allowfullscreen='true'
flashvars='file=dsc.flv'
/>

Guys this is the code. I want to have a variable inside the flashvar. the dsc.flv is a fix video. i want to loop video so i want a variable inside it. sorry for my grammar. thanks

Re: FlashVar function how to insert variables

Posted: Sat Oct 17, 2009 8:16 pm
by Eric!
I assume you know php, so just make this php echo

Code: Select all

echo "<embed src='player-viral.swf' width='263' height='220' bgcolor='undefined' allowscriptaccess='always' allowfullscreen='true' flashvars='file=".$your_variable."'/>";
or do it in-line

Code: Select all

<embed
src='player-viral.swf'
width='263'
height='220'
bgcolor='undefined'
allowscriptaccess='always'
allowfullscreen='true'
flashvars='file=<?php echo $your_variable ?>'
/>