Need some help with Flash mx.....

Started by DanClarke, Wed 07/06/2006 17:04:17

Previous topic - Next topic

DanClarke

Hey all,

firstly sorry if this is in the wrong catagory, i didn't want to post it in tech as it's not ags related. I'm struggling with something that's seemingly quite simple in flash, so if anyone can help me out i'd be uber-grateful.

I'm having problems with the 'if' commands. For example, i want to create scenes where a movie clip will only play IF 1 button or more has been pressed, or only if a certain criteria has been satisfied. Anyone who can help me out will be greatly rewarded!*

PM me or post in here if you can help

Cheers

Dan :)

*no actual prize, reward contains gratitude and thanks only.

Mikko

I'm not sure if I understood, but if you mean button like "play" then it would go something like this:

In your movieclip have a empty frame (any, but maybe first is most convenient) where you have code: stop();

Action - Button:
Code: ags

on (release){
     movieClip.gotoAndPlay(2);
}


If you need more that one button to be pressed then you could use variables to check if button has been pressed, like in button1:
Code: ags

on(release){
	btn1pressed = 1;
	if (btn1pressed==1 && btn2pressed==1){
		mc1.gotoAndPlay(2);
	}
}

And same with button2, etc.

Since I'm not pro there quite possibly is better ways to do this.

SMF spam blocked by CleanTalk