Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random Frames

Status
Not open for further replies.

lawrencesmith123

Technical User
Jun 13, 2007
2
0
0
So
im making a cartoon
and ive made a movie clip for mouth positions
frame one is a non moving mouth
the other frames are the real positions, up to 7 i think
i want the mouth positions to change randomly
when i put it on one of the 2-7 frames
until i change it back to 1
anyone know how to do this?
 
If I understood you correctly:
Code:
function startMouth():Void {
	mcMouth.onEnterFrame = function():Void  {
		mcMouth.gotoAndStop(Math.floor(Math.random()*6)+2);
	};
}
function stopMouth():Void {
	delete mcMouth.onEnterFrame;
	mcMouth.gotoAndStop(1);
}

Kenneth Kawamoto
 
haha ok so i have no clue how to write action script
so if you think thats right, then thats more then i can do

but anywho
so i think i have to plug in some numbers into that
do i?
or have you already done that for me?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top