I have a whole load of sprites each with a ling behaviour attached. That was fine and it worked well.
However, it was getting a bit messy as there are about 30 sprites and I need to animate the whole lot as one.
So I thought I'd convert all of them into a single film loop.
There general behaviour works but the bit of code to set the blend value of the individual sprite no longer works. So I need some way to access the blend value of the individual sprites of the film loop member.
Here's the bit of code:
on flashSprite me
p_dir = true
p_blend = 0
timeout().new("flashMe" &string(me.spriteNum), 40, #setVisibility, me)
on mouseUp me
p_textMember.text = p_textMember.text &string(p_key)
on setVisibility me
if p_dir then
p_blend = p_blend + 10
p_blend = p_blend - 10
if p_blend >= 100 then
p_dir = false
if p_blend <= 0 and not p_dir then
sprite(me.spriteNum).blend = p_blend
I suggest just animating the group of 30 sprites as a group. That is much easier than working with LDMs.
Here are a couple links to demos I posted in the past.
Sliding Menu: http://www.directorforum.com/showthread.php?t=6750 This demos moving a group of sprites as a unit.
Rotate LDM: http://www.directorforum.com/showthread.php?t=5496 This demos rotating a LDM in three dimensions. Something similar can be done for 2D linear movement.
Any questions, just ask.