I'm now answering my own problem, but I want to know why this is the only
thing that worked...


global gThumbLoc

on mouseEnter me
  gThumbLoc = sprite(30).locH
  gThumbLoc = gThumbLoc - gThumbLoc
  if gThumbLoc <> 0 then
    sprite(me.spriteNum + 2).visible = TRUE
  end if
end

on mouseLeave me
  sprite(me.spriteNum + 2).visible = FALSE
end

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Sharon Moeller
Sent: Monday, August 12, 2002 1:54 PM
To: [EMAIL PROTECTED]
Subject: RE: <lingo-l> Sprite loc check not working


What I am trying to do is make a hilite of the currentsprite visible if it
is rolled over and the location of sprite 30 is less than 0.  I've tried
your suggestion and still get the stupid freakin hilite showing up no matter
what.  Does the negative number thing have anything to do with it?

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Howdy-Tzi
Sent: Monday, August 12, 2002 1:05 PM
To: [EMAIL PROTECTED]
Subject: Re: <lingo-l> Sprite loc check not working


On Monday, August 12, 2002, at 11:59 AM, Sharon Moeller wrote:

> Sprite 30 is either going to be 116 or a negative number...

Then you don't need to test for 116. You just need to know if its locH
is > 0 because if it is (if it's 116), you skip out of the code. The
inverse of that is to run the code only if sprite 30's locH is negative,
so I adapted that a little.

Also currentSpriteNum is a tricky beast. In a behavior it assumes that
whatever sprite is running the behavior is the current sprite num --
even if it's not the one that the mouse cursor is in.

Without knowing what you really intend to do suggestions are difficult
to offer, but I'd try this:

   on mouseEnter me
     if sprite(30).locH < 0 then
       sprite(me.spriteNum + 2).visible = TRUE
     end if
   end

   on mouseLeave me
     sprite(me.spriteNum + 2).visible = FALSE
   end



              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!]

[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!]

[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