Flash MX Testing content of MC?

Hi Everyone :slight_smile:

I’m stuck! I’ve been surifng through the forum + several other forums for the last few days without getting closer to solving my problem.

I’ve got 3 looping movieclips on the stage. Each of the MC consists of 3 frames with an image in each frame.

When the user clicks on any of the MC, the MC stops and a certain image is loaded into a ‘holder’ on the stage. I’ve managed to do that by using this code:

onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {

	if (this._currentFrame == 1) {
	this.gotoAndStop(1);
	_root.holder2.attachMovie("pic1", "img1", 3);
	
	} 
	else if (this._currentFrame == 2){
	this.gotoAndStop(1);
	_root.holder2.attachMovie("pic2", "img2", 3);
	
	}
	else if (this._currentFrame == 3){
	this.gotoAndStop(3);
	_root.holder2.attachMovie("pic3", "img3", 3);

	}

}

}

It might not be the best code to use, but it seems to work fine :slight_smile:

The thing I’ve be struggeling with for ages now is the next step: When the user has clicked and stopped one of the movie clips she is supposed to move on and click and stop one of the other movieclips. Fine, but what I need to find out is which images/symbols that have been loaded into the different ‘holders’

If holder1 contains a movieclip with the instance name ‘pic1’ and holder2 contains an image called 'pic2’a specific external movie will be loaded etc.

Is it possible to test the content of the holders/movie clip against each other? I hope there is, but with my limited knowledge of Actionscript I’ve not manage to find out how?

I’m not sure if I’ve explained this very well. I’ve uploaded the dummy-file I’ve been working on if on: http://www.glasur.net/flash/ - just in case

It would be fantastic if anyone could help me out :slight_smile: it.

  • e

on(press){
	if (this.hitTest(_root._xmouse, _root._ymouse)) {
		_root.holder2.attachMovie("pic" + this._currentframe, "img" + this._currentframe, 3);
		_root.holder2.picLoaded = this._currentframe;
	}
}

frame 1:


onEnterFrame = function () {
	if (holder1.picLoaded && holder1.picLoaded && holder1.picLoaded) {
		//play a certain movie depending on which pic is loaded
		//this won't do anything until all the items have been clicked.
		//if it returns 1 pic 1 is loaded 2, pic 2 is loaded and so on
	}
};


thanks a lot, norie

i’ll try it out :slight_smile:

-e