On 31/8/03 8:58 pm, in article biu5k0$3i0$1forums.macromedia.com, "mrsr84"
Do you mean that you want the sprite to change (it's member) when you click> I want to be able to code a sprite change based on 2 mouse clicks. The sprite
> changes on the first mouse click and on a 2nd mouse click it would change
it and then change back to the first image or move on to a next? Either way
is relatively simple. To do the first you can simply test to see what the
currently associated member is:
-- behavior script attached to sprite
on mouseUp me
if sprite(me.spriteNum).member = "originalMember" then
sprite(me.spriteNum).member = "alternativeMember"
sprite(me.spriteNum).member = "originalMember"
If you plan on using three different images and then preventing any further
changes you could do something like this:
on mouseUp me
if sprite(me.spriteNum).member = "origninalMember" then
sprite(me.spriteNum).member = "secondMember"
sprite(me.spriteNum).member = "thirdMember"
(note that I'm just typing these code samples directly and not testing them
- I am liable to typos and brain malfunctions).
On the other hand, if you want to cycle through a longer series of cast
members then this way of working is quickly going to become unwieldly and
also quite difficult to edit. In that case there are, again, a variety of
solutions that I won't go into unless you need them.
Hope this helps,
Leo Prendergast | mngatleoprendergastdotcom
Interactive Designer / Developer
Team Macromedia Volunteer