1
votes

I have created a flex project on flash builder 4. In the MXML I have

 xmlns:mx="library://ns.adobe.com/flex/mx" creationComplete="init();"

And to check if it runs

<![CDATA[
            private function init():void
            {
                ExternalInterface.addCallback("Submit", submit);
                txtFirstName.text = "fkjkdshf";
                //txtFirstName.text = ExternalInterface.available.toString();
            }

I did export release build which creates a SWF file.

When I open the file with Firefox on Windows, It is clear that the event took action -> the text box value changes.

When I open the file on Firefox on LINUX, the text value does not change hence creationComplete event was not performed.

My goal is to set

ExternalInterface.addCallback("Submit", submit);

So that I can call this from a Qt application.

I have checked and the same Flash Player is used on both platforms.

This seems like a bug on Linux Flash Plugin.

How can I overcome this, and register "Submit" ?

2
How is this related to Qt (b/c of the tag)? - Frank Osterfeld
Perhaps this is failing on the ExternalInterface.addCallback and you're just not seeing the error, add a trace statement to the init method and use FlashTracer or Vizzy to watch the trace output of the running swf this might lead you closer to the solution, my best off hand guess is it has something to do with case sensitivity in linux vs windows just cause it's the most common error I run into when switching systems for development or deployment. Also maybe just try changing from submit to some other surely unreserved word like mySpecialSubmit. - shaunhusain

2 Answers

1
votes

The event handler should be applicationComplete, not creationComplete.

0
votes

The error was as far as I remember in the

ExternalInterface.addCallback("Submit", submit);

The security settings behave differently between Win and Linux. On my Linux platform I had to configure flash to trust the SWF file and the External executable file using 'Global Security Settings panel'

note that this tool is quite funky - the flash you see at this page actually control security settings on your computer. Also the 'Always allow' in this tool option didn't work.