I am trying to make a simple dress up game.
I have a movie clip called shirts, in which I have:
I have an AS3 action of stop() on key frame 1; I have a shirts layer were I put all my shirts in key frames. Each key frame for a shirt. I have a labels layer were I put the labels for shirts. Please note that all labels are like:
shirt1
I also have an items movie clip, in which I have 3 movie clips (pictures of the actual shirts). Each of these movie clips have instance name of...shirt1 etc.
In my AS3 layer from items movie clip, I have something like:
var shirtsArray = [shirt1, shirt2];
for each (var shirtItem in shirtsArray)
{
shirtItem.addEventListener(MouseEvent.CLICK, onShirtClick);
shirtItem.buttonMode = true;
}
function onShirtClick (event:MouseEvent):void
{
MovieClip(parent).shirts.gotoAndStop(event.target.name);
}
When I run the file and click on one of the shirts, I get this:
ArgumentError: Error #2109: Frame label instance229 not found in scene instance229. at flash.display::MovieClip/gotoAndStop() at sportbarbie_fla::Symbol3_101/onShirtClick()
Any thoughts?