Hi there,
I hope someone can help me. I had a look around the forums on other sites but did not find a post that matched my own question...
I created a simple competition form in flash that allows you to type in a promotional code and it either tells you if you have won or not. This works fine if I have only one promotional code, however if i want to have more than one winning code I can't as it takes the variable from the first or next highest level in the recordset
I think that I need to return some type of loop or array and say that if you type in either "123" or "456" either will parse the variable into FlashVars and play the winning sequence.
I am curently trying this
Quote:
$prevar = array('<'?php do { ?>'<'?php echo $row_Promotions['PromotionalVariable']; ?>
'<'?php } while ($row_Promotions = mysql_fetch_assoc($Promotions)); ?>);
|
and then this is the flash object
Quote:
<..object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="550" height="400" accesskey="p" tabindex="24" title="Promotional Form" '>'
This is a form that shows an input box and submit button. Input your code to see if you have won anything...
'<'param name="movie" value="Promotion.swf" />
'<'param name="quality" value="high" />
'<'param name="flashvars" value="ProVar=$prevar&SuccessRes=<?php echo $row_Promotions['SuccessResponse']; ?> winning code is...<?php echo $row_Promotions['PromotionalVariable']; ?>" />
'<'embed src="Promotion.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="550" height="400" flashvars="ProVar=$prevar&SuccessRes=<?php echo $row_Promotions['SuccessResponse']; ?> winning code is...<?php echo $row_Promotions['PromotionalVariable']; ?>"></embed>
</obj...
|
The code was a little funky as I was trying to get it to post in this form... ie '<' instead of <
Any help would be greatly appreciated.
Thanks
Andi