This project is archived and is in readonly mode.

#556 ✓invalid
jack.kam

Mootools 1.21 Swiff CallBack function no working.

Reported by jack.kam | January 15th, 2009 @ 11:49 PM | in 2.0 (closed)

Mootools 1.21

flash code:

import flash.external.*;

var msg:String = "Hello!!"; ExternalInterface.call("test", msg);


Mootools javascript:

window.addEvent('domready', function(){ var swfObject = new Swiff('hellow3.swf', { id: 'swiffFlashObj',

width: 500,
height: 400,
params: {
    wmode: 'opaque',
    bgcolor: '#ff3300'
},      
container: $('swf'),
    callBacks: {
        test: function(text) {          alert('loaded---'+text);        }

    }
    });

});

no working....

Comments and changes to this ticket

  • Valerio

    Valerio January 16th, 2009 @ 12:03 AM

    • State changed from “new” to “invalid”
  • Michal

    Michal January 19th, 2009 @ 12:18 AM

    Although this perhaps not the place to explain things, I recently found that if you set a callback by:

    callBacks: { test: function(msg) {//something}; }

    Then in Actionscript the function name is not "test", but it is the contents of the variable _root.test. So in your case to call it:

    ExternalInterface.call(_root.test, msg);

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins

People watching this ticket

Tags

Pages