Various people have suggested the following behaviour as a way of
communicating the end of a filmloop:

on beginSprite()
  sendAllSprites(#loopDone) -- send custom event out to let everyone know
the film loop is over
  put "loop done" -- so we know the event has been generated (hopefully)
end

Some of the time this seems to be being caught by this code, in either a
global script or a behaviour:

on loopDone
  put "whoopee!"
  -- then do stuff
end

I'm complicating this situation with the fact I'm dynamically pulling
sprites from the cast and placing them on the stage during run time, using
the following code which has been adapted from a previous post:

on putSprite myH, myY, mem, pnSpriteNum,lp
  -- kill the previous sprite
  member(mem).loop = 0 -- need to do this or if I use the same cast member
twice in a row it won't go to the beginning and play
  sprite(pnSpriteNum).member = member(0,0)
  sprite(pnSpriteNum).scriptInstanceList = []
  sprite(pnSpriteNum).puppet = FALSE
  -- put another sprite
  sprite(pnSpriteNum).puppet = TRUE
  sprite(pnSpriteNum).member = member (mem)
  sprite(pnSpriteNum).ink = 36
  sprite(pnSpriteNum).loch = myH
  sprite(pnSpriteNum).locv = myY
end

Problems I have currently encountered...can anyone shed any light?
1/ Why is the custom event only being generated on some filmloops?
2/ Why do I have to place the custom event generation on the 2nd to last
frame if I dynamically place it (it won't work on the last frame) and the
last frame if I place it manually in the score? 
3/ It seems bizarre to have to set the loop property of a cast member if I
want to use it twice in a row, seems like there's some shortcuts in the
engine here.

Cheers

Simon


______________________________________________________________

CONFIDENTIALITY NOTICE
This communication and the information it contains is intended for the person or 
organisation to whom it is addressed.  Its contents are confidential and may be 
protected in law.  Unauthorised use, copying or disclosure of any of it may be 
unlawful.  If you are not the intended recipient, please contact us immediately.

The contents of any attachments in this e-mail may contain software viruses, which 
could damage your own computer system.  While Marlborough Stirling has taken every 
reasonable precaution to minimise this risk, we cannot accept liability for any damage 
which you sustain as a result of software viruses.  You should carry out your own 
virus checking procedure before opening any attachment.

Marlborough Stirling plc, Registered No. 3008820,
Allen Jones House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH
Tel: 01242 547000     Fax: 01242 547100
http://www.marlborough-stirling.com

The following companies are subsidiaries of Marlborough Stirling plc and are 
registered in England and Wales at the above address:
Marlborough Stirling PLC, Registered No. 3008820
The Marlborough Stirling Group PLC, Registered No. 1855353
Marlborough Stirling Administration Limited, Registered No. 2341195
Metgem Limited, Registered No. 02341195

[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!]

Reply via email to