开发者

flash external ExternalInterface call in as2

I have an external interface call which should retrieve some text from the html that the swf is embedded in.

var name:Object = flash.external.ExternalInterface.call(
    "function(){return JSObject.get('Resource', 'name');}");

When I put the variable name into a textbox I get the correct text.

when I use geturl with a clickTag, under some circumstances it works (unencoded clickTag url). Sometimes it's undefined (encoded clickTag urls). If I use name.toString then it opens http://www.someurl.com/[type%20Function] or开发者_运维技巧 displays [type%20Function] in a textbox.

So I suspect that I'm having encoding issues when passing on the clickTag url. My question is, how do I convert this object to a string or assign the contents of the object to a string variable to avoid all this?

Thanks


if you use name.toString you are referring to the function definition, that's why you're getting [type%20Function]. use name.toString() instead

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜