New to asking for help on forums, but I’m at my wit’s end. Working on a project for a friend. Its a simple matching game based on some photos. The basic mechanics are generating some random numbers, pairing those with some random frame values, and then sending each MC to the corresponding frame.
This is my main game function, which positions all of my elements, and then (ideally) sets each image to its value.
function gameStart():void {
var cStrtPntX:int = 120;
var cStrtPntY:int = 185;
var cntX:int = 0;
var cntY:int = 0;
for (var i:int = 0; i<6; i++){
var photoMC:MovieClip = new camWithPic;
photoMC.x = cStrtPntX + (cntX*170)
cntX++;
photoMC.y = cStrtPntY + (cntY*215);
if(cntX == 3){
cntX = 0;
cntY++;
}
addChild(photoMC);
photoMC.mouseChildren = false;
photoMC.addEventListener(MouseEvent.MOUSE_OVER, cameraPop);
photoMC.addEventListener(MouseEvent.CLICK, doThings);
photoMC.name = "photo"+i+":"+przVals[(winNumbers*-1)];
var ranVal:Number = randomValues.indexOf(winNumbers*);
var frameNum:Number = imageFrames[ranVal];
trace("WinNumber "+winNumbers*+" = "+"frame "+frameNum);
[COLOR=#ff0000]//Various different attempts at interacting with the nested timeline[/COLOR]
[COLOR=#ff0000] photoMC.photo.picture.picthing.doSomething(frameNum);[/COLOR]
[COLOR=#ff0000] //This function will call, but if I embed any timeline interaction into this funciton, it won't fire[/COLOR]
[COLOR=#ff0000] photoMC.photo.picture.picthing.image1.alpha = 0;[/COLOR]
[COLOR=#ff0000] //Does nothing[/COLOR]
[COLOR=#ff0000] photoMC.photo.picture.picthing.gotoAndStop(frameNum);[/COLOR]
[COLOR=#ff0000] //Does nothing[/COLOR]
[COLOR=#ff0000] photoMC.photo.picture.picthing.stop();[/COLOR]
[COLOR=#ff0000] //Does nothing[/COLOR]
[COLOR=#ff0000] photoMC.photo.picture.picthing["image"+frameNum].visible = true;[/COLOR]
[COLOR=#ff0000] //Does nothing[/COLOR]
}
introFunction();
}
The red text is my current issue. No matter how I attempt to interact with the timeline of my nested value, it fails utterly. The frames play 1-12 as though there were no stop function. The frame never moves to a the determined location. The images will not change visibility values.
There are no scripts on the nested object, asides the doSomething function. None of the other nested objects have any scripts that effect the picthing MC.
The only thing that has any impact on the frames or objects of the MC are stop(); commands that I hardcode into frames. The doSomething funcition literally only has the line: “gotoAndStop(3);” to see if it will do anything. It won’t. The MC plays through on full speed and doesn’t skip a beat.
Losing my mind, and a fair bit of hair. Anyone see what I’ve done wrong?