开发者

Setting flash variables not from VB

I'm n开发者_开发技巧ew in AS 3.0. I'm trying to pass flash variables to SWF file from my VB application. It worked in AS 2.0 using: SetVariable method of ShockwaveFlash object but it doesnt' work in AS 3.0. Any idea how can I do it Thanks!


I'm not sure how the VB interface works, but how are you accessing the variables you are trying to set? How did it work in AS2?

I would guess you'd access them through

var myvar = root.loaderInfo.parameters["variableName"]


There is an old thread on the Kirupa forum that discusses many options for this: Using SetVariable with AS3 - Its ridiculous.

(That thread name is awesome, I must say). Hope it helps!

EDIT: After reading the thread myself, this seems to be the answer they arrived to:

use FlashVars="xxx=yyy" instead of SetVariable("xxx","yyy")
you can pick it up inside Flash with
root.loaderInfo.parameters.xxx
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜