1 person found this helpful
Are you applying code to the buttons via behaviours or via member scripts? (Just in case, a behaviour is attached to the sprite whereas a member script is contained in the cast member itself).
I believe that Director's Flash components are happier if coded via member scripts. This being the case, there is no need to reference "me" in the handler's arguments because no object reference (I.E. "me") will be passed to the member script, and so trying to use it in your scripts could be causing the weird things to happen.
That's all I can think of... that and "don't bother with the Flash components cos they haven't worked properly since Director 9!"
Using member scripts didn't seem to help, and besides would take an enormous amount of recoding and restructuring. It looks like your final comment is the most pertinent. :-(
Thanks for the input.
Are you re-using the same component member in multiple sprites (with different behaviours attached to these sprites)? If so then this is likely to be the problem because when you create a sprite from a component member you aren't creating an instance of that component - the sprite IS the component. Therefore if you use the component member in more than one sprite then any behaviours attached to those sprites will affect every other sprite based on the component member.
FYI, I use a huge amount of embedded Flash objects within my Director apps. Doing this gives one access to the "real" Flash components (I.E. the ones that are inside Flash), which in-turn provides gives Director a massive boost in flexibility - trees, drop-down lists, value lists (with icons)... all sorts of things. It would also solve your problem with Director's Flash components (although whether it would be worth the reprogramming I don't know!). Plus you can code many of your own functions into the Flash SWF that can then be accessed and used by Director.
If you've haven't done much SWF embedding with Director it can take a while to develop techniques for interfacing between Director and your Flash sprites, but this is an area in which things have generally improved in Director 11+ (a few notable bugs aside!). For example, you can call (and receive response from) Flash functions simply by calling the function on the SWF sprite; I.E. if you have a SWF in sprite 1, and the SWF has a function called "myFunction", then Director can use this function simply by calling "sprite(1).myFunction()". The function may return a value, or it may draw a text field, or create a data tree, or play a video with interactive overlays...
Communicating from the embedded SWF back to Director is a lot less slick, and you're effectively limited to sending one-way messages that then need to be handled by a behaviour on the Flash sprite, but it's workable nonetheless.
Maybe I'm telling you stuff you already know, but if it's not something you've looked into before then you should give it a go cos it fills-in a lot of the gaps in Director's arsenal.