The behavior below successfully set callback to a Flash object.  But
(BDirector MX fails to get a reference to a Flash object with
(B'getVariable'.  In fact the local variable assigned a Flash object
(Breturns 'void' in the handler.  The 'beginSprite' handler seems to be
(Btoo early to get a variable from a Flash sprite with 'getVariable'.
(B
(BSo, I wonder how 'setCallback' command can successfully pass a reference
(Bto a Flash object as the first argument.
(B
(Bon beginSprite(me)
(B  mySprite = sprite(me.spriteNum)
(B  oFlashObj = mySprite.getVariable("oMessenger", false)
(B  put oFlashObj  -- <void>
(B  mySprite.setCallback(oFlashObj, "onClicked", #xFlashCallback, me)
(Bend 
(B
(BAny suggestion would be very appreciated.  My whole test behavior is as follows:
(B
(B// Flash ActionScript
(B// _root
(B// Frame action
(B// MovieClip: _root.my_mc is placed
(BoMessenger = new Object();
(B_root.my_mc.onRelease = function() {
(B  oMessenger.onClicked(this._target);
(B};
(B
(B-- Lingo Behavior
(B-- Set to a Flash sprite
(Bon beginSprite(me)
(B  mySprite = sprite(me.spriteNum)
(B  oFlashObj = mySprite.getVariable("oMessenger", false)
(B  mySprite.setCallback(oFlashObj, "onClicked", #xFlashCallback, me)
(Bend 
(B
(Bon xFlashCallback(me, arg)
(B  put arg
(Bend
(B
(BRegards,
(B
(BFumio Nonaka
(BPhone: +81-42-397-9452
(BFax: +81-42-397-9452
(Bmailto:[EMAIL PROTECTED]
(Bhttp://www.FumioNonaka.com/
(BSee also:http://www.F-site.org/
(B[To remove yourself from this list, or to change to digest mode, go to 
(Bhttp://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
([EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
(Blearning and helping with programming Lingo.  Thanks!]


Reply via email to