CAN ANYBODY PLEASE HELP ME?

  • eugehet
  • Born
  • Born
  • eugehet
  • Posts: 2
  • Loc: Singapore

Post 3+ Months Ago

hey can anybody help me fill in the blanks? the codes below are for adding and subtracting balls. But i wanna make the entire 10 ball fades in when the movie loads.Then when adding or removing a ball it fades in or fades out instead of appearing or disappearing.

can someone help me fill in the comments part?


var aBalls:Array = new Array();
var nNumberBalls:Number = 10;
//var nBallInterval:Array = new Array();

//assign numbers to balls
for (var i:Number = 0; i < nNumberBalls; i++){
aBalls[i]=i;
}

//align the balls in one row
for (var i:Number = 0; i<aBalls.length; i++){
setProperty("mc" +aBalls[i],_y, 200);
setProperty("mc" + aBalls[i],_x, 150 + (i-1)*30);
// set the ball alpha to 0
//stop the setInterval function
//call the fadeBallIm function at intervals of 50milliseconds
}

// function fadeBallIn(i){
// if(condition){
// stop the setInterval function
// } else {
//setProperty("mc" + aBalls[i],__alpha, 10 + getProperty("mc" + aBall [i], _alpha));
// refreshh the screen
// }

// function fadeBallOut{
// if(condition){
// stop the setInterval function
// remove last ball from end of array
// }else{
// setProperty("mc" + aBalls[i],_alpha, getProperty("mc" +
//aBalls[i],_alpha) - 10);
// refresh the screen
// }
//}


btnAdd.onRelease = function(){
if(aBalls.length <nNumberBalls){//allow add if les than total number
aBalls.push(aBalls.length); //add 1 ball to the end of array
setProperty("mc" + aBalls[aBalls.length-1],_visible, true);
// set the ball alpha to 0
//stop the setInterval function
//call the fadeBallIn function at intervals of 50 milliseconds
}
};
btnSubstract.onRelease = function(){
if(aBalls.length > 0 ){ //at least one ball to substract
//stop the setInterval function
//call the fadeBallOut function at intervals of 50 milliseconds
setProperty("mc" + aBalls[aBalls.length - 1],_visible, false);
aBalls.pop(aBalls.length - 1);//remove last ball from end of array
}
};
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • IceCold
  • Guru
  • Guru
  • User avatar
  • Posts: 1254
  • Loc: Ro

Post 3+ Months Ago

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 9 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.