At 2:49 AM +0200 10/19/00, Jakob Hede Madsen wrote:
>I use a lot of ancestor coding and almost never use me.pProp syntax.
>If your properties are properly placed within their current class,
>there is probably no reason to move or copy them to another class.
<snipped a lot of good stuff from Jakob about ancestors>
After reading Jakob's post, I remembered that the original question
was about using buttons and ancestors for buttons. I realized that
while I use a lot of different types of buttons, I have never used
ancestors with buttons.
Instead, I typically use a technique to specifically avoid the need
for ancestors and buttons. I describe this technique in detail in my
article on DOUG at:
http://www.director-online.com/accessArticle2.cfm?id=340
But here is the basic idea. Create a button behavior that handles
the on screen actons of the button (up, down, rollover), etc. In
that script, when you detect that the button has been hit, then you
send out a special named message to another behavior attached to the
same sprite. I typically use "mHit". So in the button behavior,
when I detect that a button has been hit, I do a:
sendSprite(spriteNum, #mHit)
Then I attach a second behavior that has:
on mHit me
-- do whatever you do when you hit this button
end
2 cents more,
Irv
--
Lingo / Director / Shockwave development for all occasions.
(Over two millions lines of Lingo code served!)
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/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!]