|
-
Hello
I'm not sure how to define the images in the array or get the image clip into the array and display a specified number of images from the array. I assume its just random(10) ?
Below is my code.
Thank you
var balloons:Array = new Array("red2", "red2", "re_wo", "red_we", "red_to",
"red_su", "red_shi", "red_sa", "red_ru", "red_ri","red_ra", "red_o", "red_ni", "red_na", "red_mi", "red_ku", "red_ko", "red_i", "red_fu", "purple_yu","purple_wa", "purple_no", "purple_ne", "purple_mo","purple_ka", "purple_he", "purple_a", "purple","orange_yo", "orange_wi", "orange_u", "orange_tsu","orange_te", "orange+se", "orange_me", "orange_ma","orange_kyo", "orange_ho", "orange_ha", "orange","blue_ya", "blue_ta", "blue_so", "blue_ro", "blue_nu", "blue_mu", "blue_ki", "blue_hi","blue_e", "blue_chi");
import mx.transitions.Tween;
import mx.transitions.easing.*;
balloons._alpha = 0;
//attachMovie("red2", "red2", "re_wo", "red_we", "red_to", "red_su", "red_shi", "red_sa", "red_ru", "red_ri", "red_ra", "red_o", "red_ni", "red_na", "red_mi, depth[1]);
hitBackground.onEnterFrame = function(){
if ( hitBackground.hitTest(balloons) ){
balloons._alpha = 100;
} else {
balloons_alpha = 0;
}
}
counter = 0;
hitBackground.onPress = function(){
counter = counter + 1;
if (counter == 1){
var balloonstween1:Tween = new Tween(balloons, "_x", mx.transitions.easing.Regular.easeIn, random(6), false);
balloonstween2.onMotionFinished = function(){
attachMovie("balloons","balloons",1);
}
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|