A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: hittest make movieclip inside movieclip display

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    2

    hittest make movieclip inside movieclip display

    Hi. My name is Chris and i am having a problem with hittest and really don't know where to go from here. I was wondering if anyone could help

    Basically i have a rocket mc, instance called Rocket1. I then have a shape which i converted to a mc called symbol2 and then inside that mc made another mc with an instance name of firstpoint1945. When Rocket1 comes into contact with symbol2 i want firstpoint1945 to appear on screen with the text in it and when the Rocket1 navigates away for the text to disappear.
    Inside the movieclip symbol i made a second frame on the timeline and inserted the firstpoint1945 mc. I then named that frame firstpointtext.
    I tried this but i fear this is totally wrong. All that happens is that firstpoint1945 (the text) just flashes on screen constantly.

    onEnterFrame = function ()
    {
    if (_root.symbol2.hitTest(_root.Rocket1))
    {
    _root.firstpointtext.gotoAndPlay("firstpointtext") ;
    }
    };

    Any help would be much appreciated as i am pulling my hair out. Thanks.

  2. #2
    Junior Member
    Join Date
    May 2013
    Posts
    2
    Fixed i needed to change _root.firstpointtext.gotoAndPlay("firstpointtext") ; to _root.symbol2.gotoAndPlay("firstpointtext") ;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center