开发者

Why are my flashvars 'undefined'?

I trying to access a flashvar on the first frame but they are alway undefined. What am I doing wrong?

Embed:

<embed height="300" width="460" FlashVars="config=test" wmode="window" alt=""
 classid="clsid:D27CDB6E-A开发者_Go百科E6D-11cf-96B8-444553540000" salign="t" allowscriptaccess="always" 
 quality="Autolow" bgcolor="#FFFFFF" name="InteractiveTool" id="InteractiveTool" 
 style="" src="calc_thr_004.swf" type="application/x-shockwave-flash" />

ActionScript:

trace("level0: " + _level0.config);
trace("root: " + root.config);

The results of this this are:

level0: undefined
root: undefined

This was developed in AS2. How can I get the value of 'config' from the flashvar?

Thanks!


It's been a while since I've used AS2 or FlashVars, but that looks correct to me. Some things to double-check:

  • Is your <embed> tag inside an <object> tag which does not have the FlashVars parameter?
  • Are you using at least Flash Player version 6? FlashVars were not supported prior to this version.

Either of these things could cause the contents FlashVars to not be passed to the top level of the movie.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜