# gotoAndStop help

**URL:** https://forum.kirupa.com/t/gotoandstop-help/74462
**Category:** flash
**Created:** [December 29, 2004, 1:24pm UTC](https://forum.kirupa.com/t/gotoandstop-help/74462 "2004-12-29T13:24:30Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![csouli](https://avatars.discourse-cdn.com/v4/letter/c/db5fbb/32.png) [@csouli](https://forum.kirupa.com/u/csouli)
#### Post date: [December 29, 2004, 1:24pm UTC](https://forum.kirupa.com/t/gotoandstop-help/74462/1 "2004-12-29T13:24:30Z")

</div>

Hello, i am new to flash mx 2004, and am stuck on what seems should be straight-forward. I am trying to make a game using tiles, and have a class called buildmap, with the following function

public static function buildGame(map) {  
var mapWidth = map[0].length;  
var mapHeight = map.length;  
for (var i = 0; i\<mapHeight; ++i) {  
for (var j = 0; j\<mapWidth; ++j) {  
var name = “t\_”+i+"\_"+j;  
\_root.attachMovie(“tile”, name, i_100+j_2);  
\_root[name].gotoAndStop((map\*[j]+1));  
\_root[name].\_x = (j_30);  
\_root[name].\_y = (i_30);  
}  
}  
}

but when i test the movie the gotoAndStop() call does not work and it just plays all the frames in the attached movie.  
Any ideas?? :-/
