Hi Paul,

The problem is that you attach it as Player_Object and refer to it as
mcDolphin.

Changing:
if (game_mc.bg_mc.hitTest(game_mc.mcDolphin._x, game_mc.mcDolphin._y, true))
{
Into:
if (game_mc.bg_mc.hitTest(game_mc.Player_Object._x,
game_mc.Player_Object._y, true)) { 

Solves the problem.

Greetz,

Bernard

> -----Oorspronkelijk bericht-----
> Van: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] Namens Paul Steven
> Verzonden: maandag 24 april 2006 16:37
> Aan: Flashcoders mailing list
> Onderwerp: [Flashcoders] hitTest difference between attached 
> mc and one placedon stage in authoring
> 
> I am having problems making the hitTest function work with a 
> movie clip attached from the library
> 
> Basically I am making a game that involves a dolphin swimming 
> up a river and I want to detect when the dolphin hits the river bank.
> 
> The following works fine when the dolphin is placed on stage 
> in authoring mode
> 
> if(mcBanks.hitTest(mcDolphin._x, mcDolphin._y, true){
> 
> //doplhin has hit
> 
> }
> 
> See http://www.mediakitchen.co.uk/dolphin.html
> 
> Whereas when I attach the dolphin using attachMovie it does 
> not work and infact detects a collision at all times:
> 
> See See http://www.mediakitchen.co.uk/dolphin_new.html
> 
> Any ideas why this should not work when the dolphin is attached.
> 
> Here is a link to the fla incase you should want to see the code
> 
> http://www.mediakitchen.co.uk/dolphin_new.zip
> 
> Any advice much appreciated
> 
> Thanks
> 
> Paul
> 
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> 
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training 
> http://www.figleaf.com http://training.figleaf.com
> 

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to