Man guys if u could help me with this it would be great check it “textBubble” is a movieclip that has 13 frames now i wanted to section off the different frames in this fashion 1,2,3,4 5,6,7,8 9,10,11,12. 1-4 equals broken femur Hints while concussionHints= 5,6,7,8 and etc… my issue is that the number comeing from the if then statements is no staying in there groups. i may get 1 then 11 then 5 instead of what i want which is 1 then 4 then 2, which is staying in that set array of numbers. Is what i want to do comeing across clearly
var brokenfemurHints=1;
var concussionHints=2;
var foodPosioningHints=3;
function hintClick(event:MouseEvent):void {
var textBubble = new TextBubble();
addChild(textBubble);
textBubble.x=395;
textBubble.y=250;
trace("working");
var randomText:Number=Math.ceil(Math.random()*3);
var randomThree:Number=Math.ceil(Math.random()*3);
if (randomThree == brokenfemurHints) {
var brokenFemur:Number=Math.ceil(Math.random()*4);
textBubble.gotoAndStop(brokenFemur);
trace(brokenFemur)
}
if (randomThree == concussionHints) {
var Concussion:Number=Math.ceil(4+Math.random()*4);
textBubble.gotoAndStop(Concussion);
trace(Concussion)
}
if (randomThree == foodPosioningHints) {
var FoodPosioning:Number=Math.ceil(8+Math.random()*4);
textBubble.gotoAndStop(FoodPosioning);
trace(FoodPosioning)
}
}