Ask a Question related to Macromedia Director Basics, Design and Development.
-
spdorsey webforumsuser@macromedia.com #1
Swapping a sprite with another that is exactly spaced in cast
Hello
Lingo - wow.
I'm trying to get a cast member to swap with another on mouseEnter. The other member is exactly 27 spaces forward in the cast.
I'd normally just swap it with the cast member's number, but I need to apply this script to several cast members, all of which have their "swapping" cousins residing 27 spaces forward in the cast.
This would be easier than creating several dozed scripts and applying them to each sprite on the stage.
Here's what I have so far. I'm new at this, so I'm hoping that the error is simple.
on mouseEnter me
set change = the currentSpriteNum of me
set the member of sprite the currentSpriteNum to member (change + 27)
end
when I use the script, I get a "Property not found" error. I do not know what that means.
Any help is appreciated. Thanks!
-----------------S
--------------------
Steve Dorsey
Dorsey Graphics
:: 3D
:: Animation
:: Web Design
:: Digital Media
[url]http://www.dorseygraphics.com[/url]
--------------------
spdorsey webforumsuser@macromedia.com Guest
-
Swapping cast member of a masked sprite..... not working.
Hey guys, Have a semi diffucult one here. I have a cast member in sprite(1). It's castNum is 1. It's mask for that member is in memberNum 2.... -
Swapping a member with another that is exactly 27 cast members ahead
Try this property oldmem on mouseEnter me oldmem = sprite(me.spriteNum).memNum sprite(me.spriteNum).memNum = oldmem + 27 end -
swapping video cast members
Hey all, "Long time listener, first time caller"... I'm working on a director project with multiple movies playing on the stage, and am... -
SWAPPING A SPRITE FOR A FEW SECONDS
Hi forum members I am wanting to make a function that will swap a sprite member for a few seconds then restore back. All that I really need to... -
Swapping cast Members
I would like to swap one cast member with another one. depending on what button the uses clicks. I tried using the sprite(x).member=member... -
Rob Dillon #2
Re: Swapping a sprite with another that is exactly spaced in cast
Hi Steve,
The way that you have that code written, you're telling your movie to
look ahead in the cast 27 + the number of the current sprite channel.
What you want to do is reference the member number of the member that's
in the current sprite channel.
Something like this:
---------
property thisSprite
property thisMember
on beginSprite me
thisSprite = me.spriteNum -- the current sprite channel number
thisMember = sprite(thisSprite).member.memberNum -- the number of the
member in the current sprite channel
end
on mouseEnter me
sprite(thisSprite).member = member((thisMember + 27),1)
end
----------
You should always reference a member by it's number and the number of
the cast that it resides in. The default cast is always cast 1.
--
Rob
_______
Rob Dillon
Team Macromedia
[url]http://www.ddg-designs.com[/url]
412-243-9119
[url]http://www.macromedia.com/software/trial/[/url]
Rob Dillon Guest



Reply With Quote

