gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInt


From: Nachanon Vetjasit
Subject: [Gnash-commit] [bug #37223] JavaScript call didn't reach the ExternalInterface callback
Date: Thu, 30 Aug 2012 09:09:26 +0000
User-agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.51

URL:
  <http://savannah.gnu.org/bugs/?37223>

                 Summary: JavaScript call didn't reach the ExternalInterface
callback
                 Project: Gnash - The GNU Flash player
            Submitted by: nachanon
            Submitted on: Thu 30 Aug 2012 04:09:26 PM ICT
                Category: plugin
                Severity: 3 - Normal
                 Release: 0.8.10
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

This is a spin-off from bug #37008 (SoundCloud issue).

I've tried to call my test flash's method from JavaScript land,
using Flash 8-style ExternalInterface callback that's expected
to recieve the parameters "Hello" and "World" from JavaScript land,
and return "Too" back to the JavaScript land.

The ActionScript callback method was coded like this

public function scriptCalled(arg1,arg2):String {

        trace("callee: callback entered");

        if(arg1=="Hello" && arg2=="World") {

                trace("callee: callback succeeded, expected (Hello,World) got
(Hello,World)");

                calledbackindicator.gotoAndStop(2);

        } else {

                trace("callee: external called back incorrectly, expected 
(Hello,World) got
("+arg1+","+arg2+")");

        }

        trace("callee: callback finished");

        return "Too";

}


The callback was invoked correctly under Adobe Flash Player (with proper
security settings),
but doesn't under Gnash.

This is a trace output from Adobe Flash Player 11:

callee: load
callee: finished loading
status: load
status: finished loading
status: load
status: finished loading
callee: first run
callee: external initializing
callee: adding callback
callee: finished first run
callee: callback entered
callee: callback succeeded, expected (Hello,World) got (Hello,World)
callee: callback finished

You may see that the ActionScript callback function was invoked.

This is a trace output result from Gnash:

2929:1] 292 TRACE: callee: load
2929:1] 292 TRACE: callee: finished loading
2929:1] 292 TRACE: callee: first run
2929:1] 292 TRACE: callee: external initializing
2929:1] 293 TRACE: callee: adding callback
2929:1] 294 TRACE: callee: finished first run
2929:1] 384 TRACE: status: load
2929:1] 384 TRACE: status: finished loading
2929:1] 384 TRACE: status: load
2929:1] 384 TRACE: status: finished loading

You may see that the ActionScript callback was not invoked.
>From JavaScript perspective, the call returns null.


Note that a group of lines like this appeared in the log every time that I
tried to call this ExternalInterface callback
(The "121 bytes" part of the log was consistent; it's always 121)

2929:1] 2796 DEBUG: There are 121 bytes in the network buffer
2929:1] 2796 DEBUG: bool
gnash::movie_root::processInvoke(gnash::ExternalInterface::invoke_t*) enter
2929:1] 2796 DEBUG: Processing script_call call from the Browser.
2929:1] 2796 DEBUG: bool
gnash::movie_root::processInvoke(gnash::ExternalInterface::invoke_t*)
returning

Full Gnash debug log (verbosity = 2), also attached here.
http://www.mediafire.com/?db433qgumndy3dy

This is my test flash file and source, accompanied with HTML page,
created from Adobe Flash CS3 with Flash 8 target, also attached here.
http://www.mediafire.com/?3c9737f29embsis


Gnash: gnash 0.8.10-1~lenny, browser-plugin-gnash 0.8.10-1~lenny (both from
getgnash.org APT repository)
Browser: iceweasel 3.0.6-3 from Debian main repository (no addons)
System: Debian GNU/Linux 5.0 Lenny on i386



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Thu 30 Aug 2012 04:09:26 PM ICT  Name: js2flash.zip  Size: 3kB   By:
nachanon
Test flash file, source code and Gnash debug log
<http://savannah.gnu.org/bugs/download.php?file_id=26447>
-------------------------------------------------------
Date: Thu 30 Aug 2012 04:09:26 PM ICT  Name:
iceweasel3.0-gnash0.8.10-js2flash.log.txt  Size: 4kB   By: nachanon
Test flash file, source code and Gnash debug log
<http://savannah.gnu.org/bugs/download.php?file_id=26448>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37223>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]