On Monday, December 30, 2002, at 11:09 AM, kevin pyatt wrote:

Below is the sample code. Part 1 works, part 2 does not.When i run part 2 i get the "Script error: object expected member("Eqnm1box").text=gquestion. Any ideas. I greatly appreciate your time.
I'm assuming these are two different behaviors attached to a given sprite.

Since you have not in any way made the 'gquestion' variable available to the code in behavior 2, it doesn't know what to do with it.

I'd suggest -- as a quick fix really -- simply making the variable global by adding this line to BOTH of the behaviors' code, immediately ABOVE the beginSprite handlers:

GLOBAL gquestion

So it should look like this in both behaviors:

GLOBAL gquestion

on beginSprite me
-- bla bla bla

There are other ways to deal with this but this should be a fast fix.


Warren Ockrassa | http://www.nightwares.com/
Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
http://shop.osborne.com/cgi-bin/osborne/0072195622.html

[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