开发者

Why calling flash function from javascript fails for me?

开发者 https://www.devze.com 2023-02-02 03:39 出处:网络
I\'m doing it this way: ... public function j2fCall() { Alert.show( \"j2fCall?\"); } public function Main( nav: Navigation )

I'm doing it this way:

...

public function j2fCall()
{
    Alert.show( "j2fCall?");
}

public function Main( nav: Navigation )
{
    if(ExternalInterface.available)
    {
        ExternalInterface.addCallback("javascriptUpdateSettings", j2fCall);
    }

    ...
}

But when I call javascriptUpdateSettings from javascript,only got the error:

javascriptUpdateSettings is not defined
开发者_JAVA百科

What's wrong above?

UPDATE

I'm embedding swf and call it this way:

swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0","expressInstall.swf", flashvars, params, attributes);
swfobject.javascriptUpdateSettings();


Try swfobject.getObjectById("myContent").javascriptUpdateSettings()

0

精彩评论

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