Message: 7 From: "nik crosina" <[EMAIL PROTECTED]> Subject: Re: <lingo-l> (no subject) To: [EMAIL PROTECTED] Date: Thu, 25 Jul 2002 01:13:01 +0100 Reply-To: [EMAIL PROTECTED]
On Wed, 24 Jul 2002 13:05:37 -0500 "Eric Terry" <[EMAIL PROTECTED]> wrote: > Can someone show me the way to find the member name of the sprite when this > rollover is done? > Is there a way to use that name in my case statement? >hi, > >this should give you the name of the sprite in question, >you can then use the nameof the sprite in your case statement. > >sprite(currentSprite).member.name >nik -- <email> [EMAIL PROTECTED] </email> --__--__-- Hi, Just did a project where I gave a long list of text members the same name as frame tags that I wanted them to jump to when they were rolled over and clicked. I had trouble extracting just the name when I used the "currentSprite" call. I wanted just the simple name of the member without cast or path info. Instead of "currentSprite" I declared the property "SpriteNum" at the top of a sprite script (you do that with just: property SpriteNum as the first line of your script) and put the following line in the "mouseEnter" section of the script (it combines "name of sprite", "member of sprite" and "SpriteNum" so that it works with any sprite in any channel and extracts the short name of the underlying cast member): put the name of the member of sprite(the spriteNum of me) into gportJump That line pulls out just the simple, short name of the member as I had named it in the cast (you have to make sure that you name it in the cast for this to work, otherwise it's numerical or an error) and stuck it into the "gportJump" variable. Then I used "gportJump" in my mouseDown section. Hope this helps! Al Allen Stare [EMAIL PROTECTED] Intense Multimedia, Inc. [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!]
