check out the example code www.yoyocreative.co.uk/example/bomb.swf
thanks in advance
I'm certainly no expert at this sort of thing, but I think you may have to try building your "landscape" from a collection of named instances of a Movie Clip. That way, when the "bomb" (which would also need to be a named instance of a Movie Clip) hits a piece of the landscape it can communicate with it, telling it to disappear or whatever.
I think you'd need to test for the _x and/or _y properties of the bomb relative to the same properties of each piece of landscape. Something like:
If ( GetProperty("/bomb",_x) > (GetProperty("/target",_x) - (GetProperty("/target",_width) / 2)) and
GetProperty("/bomb",_x) < (GetProperty("/target",_x) + (GetProperty("/target",_width) / 2)) and
GetProperty("/bomb",_y) > (GetProperty("/target",_y) - (GetProperty("/target",_height) / 2)) and
GetProperty("/bomb",_y) > (GetProperty("/target",_y) + (GetProperty("/target",_height) / 2)) )
Set Property ("/target", Alpha) = GetProperty("/target", Alpha) / 2
End if
... called on a loop in the "target" clip's timeline would continually test whether the bomb was inside the target, and then fade out the target once it was.
Of course, this would require quite a lot of individually named clip instances to work, and each instance of the target would have to check for the presence of the bomb inside its own boundaries, so you'd need to name them dynamically somehow. This sort of thing will be a lot easier if you're using Flash 5... apart from anything else, at least you'd be able to see all of an Action Script at once instead of fiddling around inside those pathetically small windows!
Any help?
Robin
Mike wrote:
--
Robin Nicholl
Studio Alias Limited
Visit us online at: www.studioalias.com
--
This e-mail is confidential and intended solely for the addressee. Neither the message nor any attachments may be read, copied, used or stored in any way by anyone other than the addressee. If you received it in error, please contact Studio Alias Limited on +44 (0)1865 858560.
Internet communications are not secure and therefore Studio Alias Limited does not accept legal responsibility for the contents of this message or any attachments. Views or opinions expressed are solely those of the author and do not necessarily represent those of Studio Alias Limited unless otherwise specifically stated.
chris
"chris Henden" <ch...@kode.co.uk> wrote in message
news:8vb6hh$1i2$1...@misc.macromedia.com...