Alan
Alan

Reputation: 5189

Why calling flash function from javascript fails for me?

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

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();

Upvotes: 0

Views: 127

Answers (1)

beshkenadze
beshkenadze

Reputation: 645

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

Upvotes: 4

Related Questions