When Macromedia released Shockwave 10.1 (and by the name Macromedia, you know that that has been a while back), they introduced support for Flash 8 content. Unfortunately, the update broke the builtin eventlisteners for Flash Components, a feature that was introduced in Director 10.0
Since then, there have been some updates to Shockwave, and the problem has been fixed. At least it has been fixed for the windows version of Shockwave, I am not 100% sure about the OS X version. And even if the newest version of Shockwave fixes the problem, there are still users out there who have not updated their Shockwave install and are 'stuck' with broken Flash Components in Director.
Fortunately there's a workaround that has been posted in forums here and there, but its still hard to find in google, even if you know what you're looking for. Here's hoping that a blog entry will help that.
Instead of using Director's builtin eventlisteners for Flash Components, here's what I do: I specifically turn off all the eventlisteners in the Property Inspector (see the 'Flash Component' tab, and turn off all options listed under 'Component Events'). Next I attach this behavior, multiple times for each event I want to listen to:
property pSprite property poEventListener property pEvent property pCallback on beginSprite me pSprite = sprite(me.spriteNum) end beginSprite on exitFrame me if voidP(poEventListener) then poEventListener = pSprite.newObject("Object") pSprite.setCallBack(poEventListener, pEvent, #event, me) pSprite.addEventListener(pEvent, poEventListener) end if end exitFrame on event me sendSprite(pSprite, symbol(pCallback)) end event on getPropertyDescriptionList me tlProp = [:] tlProp[#pEvent] = [#format:#string,#default:"click",#comment:"Flash component event"] tlProp[#pCallback] = [#format:#string,#default:"click",#comment:"Sprite callback handler"] return tlProp end getPropertyDescriptionList
For a button, you would fill in 'click' for both the Flash Component event and the Sprite callback handler, which results in the 'on click' handler in any other behaviors attached to the same sprite. This works for the 'broken' versions of the Flash 8 Asset Xtra, as well as the pre-10.1 and the fixed Xtra.
Update: An added bonus is that there are more events than those exposed to the 'Component Events' interface in Director. You may have to dig into the Flash documentation for a full list for each component, but here are a couple of events shared between most components: