初めて Flex に遭遇した PHP ジュニアとして、これは何日もの間私の頭を悩ませました。flashvar には、Flex ビデオ コンポーネントで再生したいビデオのソースが含まれています。プレーヤーの HTML は次のようになります。
function createPlayer(videoSource){
document.writeln("<div id=\"player\">");
document.writeln("<object width=\"489\" height=\"414\" FlashVars=\""+videoSource+"\">");
document.writeln("<param name=\"player\" value=\"bin-debug/FlexPlayer.swf\">");
document.writeln("<embed src=\"bin-debug/FlexPlayer.swf\" name=\"player\" width=\"489\" height=\"414\" FlashVars=\""+videoSource+"\">");
document.writeln("</embed>");
document.writeln("</object>");
document.writeln("</div>");
}
FlexPlayer.mxml で FlashVars を呼び出そうとしましたが、機能しません。FlashVars にアクセスするには、mxml のソースで何を適用する必要があるか教えてください。
<s:VideoPlayer id="Player" left="0" top="0" width="497" height="414"
skinClass="MySkin" source="FlashVars"/>
</s:Group>