Sorry Tom, that didn't work.  For some reason, when I add that handler,
the behavior won't attach to anything.

- MM

In contrast to what you state, there's no scriptReference param passed??
>From the documentation:
// JavaScript syntax
function isOKToAttach(aSpriteType, aSpriteNum) {
        switch (aSpriteType) {
                case symbol("graphic"): // any graphic sprite type
                        return sprite(aSpriteNum).member.type !=
symbol("shape");
                        // works for everything but shape cast members
                case symbol("script"): // the frame script channel
                        return false; // doesn't work as a frame script
        }
}



> Yes, the first parameter passed to the isOKToAttach is a reference to
the script cast member itself (note that it is _not_ a reference to the
instanced script for it hasn't been instanced yet), the second is your
spriteType. So change your isOKToAttach handler to be like this:

function isOKToAttach (scriptRef, spriteType, spriteNum) {
 ...
}

Please note that this is true in both Lingo and JS syntax.


[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[email protected]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to