GetOne returns where in a list it found a match of the thing you are looking for - or zero if it doesn't find it. So, here's what you do. Set up your list in a beginSprite handler, but save it in a property variable. Then, where you are doing your check, refer to this list:
property pListOfNames -- saves the list of things to look for on beginSprite me -- Assign this only once! -- Brackets work just fine, no need for the "list" function pListOfNames = ["cone01", "ROOKPLY1R", "ROOKPLY1L", "ROOKPLY2R", "ROOKPLY2L"] end on exitaction me, whichmodel where = getOne(pListOfNames, whichmodel.name) if where > 0 then -- found it in the list scene.model(whichmodel.name).shader.emissive = rgb(0,0,0) cursor -1 end if end Irv At 6:34 PM +0000 3/8/02, Kevin Mccarthy wrote: >Can you explain this bit clearer please.. > > > > where = getOne(listOfNames, whateeverYouWantToTestFor) > > if where > 0 then > > -- found it > > else > > -- not in the list > > end if > > > >for instance if I make the list in my on beginsprite: > > > > listOfNames = list("cone01", "ROOKPLY1R", "ROOKPLY1L", "ROOKPLY2R", >"ROOKPLY2L") > > > >and then I need to get this recognised in the other statement, something >like this: > > > >On exitaction me, whichmodel > > if (whichmodel.name) <> listOfNames then > > scene.model(whichmodel.name).shader.emissive = rgb(0,0,0) > > cursor -1 > > end if > > > >can you correct me! > > > > > >-KEV- > >[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!] -- Lingo / Director / Shockwave development for all occasions. (Home-made Lingo cooked up fresh every day just for you.) [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!]