At 14:52 +0100 2001_12_04, Rajiv Ranjan wrote:
>Hi list ,
>
>is there anyway in lingo assign a frame script at runtime.

Yes you can do this, as others described.
You can even have more than one object assigned to the 
scriptInstanceList of the "frameScriptSprite".
However I recently perused this "hack", to relay keyboard events from 
the score to LDMs, and while I did manage to get it to work reliably 
in the end, in the course I experienced many odd things, that clearly 
indicates that the runtime engine is not prepared to handle multiple 
objects in the "frameScriptInstanceList", and you have to do a lot of 
hand-holding yourself, and proceed with extreme caution.

I should have documented my findings properly when I researched it, 
but judging from my code, there are at least the following rules:

1) Don't modify the frameScriptInstanceList during beginSprite 
events. I used a timeoutMethod to insert the extra object.
2) You must remove the extra object yourself before the "frameSprite" 
ends. This is easily done through "objectSelfRemoval" from the 
endSprite event.

Jakob


[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