Splitting Headache Problem #29034019712305971091.1
For those unfamiliar with the "stack" code I've been working on lately, please see my earlier posts or see the text of the code @ http://www.sivik.org/director/stackmanagement.txt.; As of right now, I have several of these "stacks" created controlling a number of different subsystems in my movie. One of these stacks contains events which need to be called by the flash movie via the "lingo" command, ie: lingo: randomstackmgr.stack[stackpointer].generaterandom(). For some reason or another, flash cannot call my director objects directly (or at least, I have yet to be able to get that to work). To work around this problem, however, I created a handler called "flashstackaccess" which accepts a parameter "stackcmd" and executes that. Here is the handler: on flashstackaccess stackcmd do (stackcmd) end flashstackaccess And here is a sample call: --in flash: lingo: flashstackaccess("randomstackmgr.stack[stackpointer].generaterandom()"); All this seems straightforward, however, I run into a problem when I attempt to send string vars as part of the parameters to the handler contained within the stack. That may sound confusing, so let me illustrate. If the aforecalled "generaterandom()" now accepts two parameters, one a string, the other a number, the call to the handler in director would be something like: randomstackmgr.stack[stackpointer].generaterandom("this is a string par", 60) My problem arises in the fact that I when I attempted to embed a string parameter within a parameter that is already a string, all sorts of strange bugs arise. Again, illustrated for clarity: flashstackaccess("randomstackmgr.stack[stackpointer].generaterandom("str ingvar",60)") Obviously the above is illegal, since it will assume the double quotes after the left paren close out the statement. Also complicating things is the fact that director does not recognize single quotes as string delimiters (that would solve the problem for me in an instant). I cannot escape the characters any other way, and since I am executing a literal statement with the do() command, there is not a real opportunity for me to format the data once it comes into director. My question is, how do I format my handler call so that I can pass the data I want? ~matt desimone [EMAIL PROTECTED] www.syrupnyc.com [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!]
