# Help Me On Actionscripts

**URL:** <https://forum.kirupa.com/t/help-me-on-actionscripts/11766>\
**Category:** flash\
**Created:** [January 22, 2003, 1:45am UTC](https://forum.kirupa.com/t/help-me-on-actionscripts/11766 "2003-01-22T01:45:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ISovietI](https://avatars.discourse-cdn.com/v4/letter/i/87869e/32.png) [@ISovietI](https://forum.kirupa.com/u/ISovietI)\
**Post date:** [January 22, 2003, 1:45am UTC](https://forum.kirupa.com/t/help-me-on-actionscripts/11766/1 "2003-01-22T01:45:30Z")

</div>

I have figured out how to use “HitTest”.  
but I have a game I’m making, and I made an invisable moveclip, and when my player goes on it or “hitTest” it. Then it will move to the next frame and play…

could someone help me wih this problem…

here is my code:  
If \_root.player, HitTest (\_root.object2) then  
telltarget “?my movie”  
gotostop “56”

but I want to know how do you tell the movie to move to a specific frame?

that only thing I know is how to tell a moveclip to move a specific frame inside of it.

how do you tell the movie to move…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 22, 2003, 1:51am UTC](https://forum.kirupa.com/t/help-me-on-actionscripts/11766/2 "2003-01-22T01:51:30Z")

</div>

it depends on where your code is. You can do it FROM where that code is called, or, if you want you can use absolute referencing and use a target for the movieclip as it exists from the main timeline.

The main timeline in Flash is called \_root. So if you have any movieclip on the main timeline, you can reference it using \_root.movieClipInstanceName - just like you used for player and object2.

So if you know how to target your movieclip from \_root you can use that to tell it to gotoAndStop frame 56. ex:

if (\_root.player.hitTest (\_root.object2)){  
\_root.myMovie.gotoAndStop(56);  
}

if myMovie was inside another clip, you can just reference it through that clip i.e.

if (\_root.player.hitTest (\_root.object2)){  
\_root.anotherClip.myMovie.gotoAndStop(56);  
}

for more on referencing see  
[http://www.kirupaforum.com/showthread.php?s=&threadid=12462#post88774](http://www.kirupaforum.com/showthread.php?s=&threadid=12462#post88774)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [January 22, 2003, 3:34am UTC](https://forum.kirupa.com/t/help-me-on-actionscripts/11766/3 "2003-01-22T03:34:10Z")

</div>

so if I had my movie called “mover”

my code will be

if (\_root.player.hitTest (\_root.object2)){  
\_root.mover.gotoAndStop(56);?  
}
