在APP內拼成花花的背景:

UIButton *button = [[UIButton alloc] init];
CGRect frame = button.frame;
frame.origin.x = 500; // new x coordinate
frame.origin.y = 500; // new y coordinate
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration: 0.25];
button.frame = frame;
button.alpha = 0;
[UIView commitAnimations];
for (var i:uint = 0; i < this.numChildren;i++){
var child = this.getChildAt(i);
if (child is SimpleButton){
trace(child,"is SimpleButton");
}
}
$.urlParam = function(name){
var results = new RegExp('[\\?&]' + name + '=([^]*)').exec(window.location.href);
if (!results) { return 0; }
return results[1] || 0;
}
private Bitmap mergeBitmap(Bitmap firstBitmap, Bitmap secondBitmap) {
int newWidth = firstBitmap.getWidth() + secondBitmap.getWidth();
Bitmap bitmap = Bitmap.createBitmap(newWidth, firstBitmap.getHeight(),
firstBitmap.getConfig());
Canvas canvas = new Canvas(bitmap);
canvas.drawBitmap(firstBitmap, 0, 0, null);
canvas.drawBitmap(secondBitmap, firstBitmap.getWidth(), 0, null);
canvas.save(Canvas.ALL_SAVE_FLAG);//保存
canvas.restore();
return bitmap;
}
private DoubleImage(Bitmap bm1, Bitmap bm2){
ImageView imgView = new ImageView(this);
Drawable[] layers = new Drawable[2];
layers[0] = new BitmapDrawable(getResources(),bm1);
layers[1] = new BitmapDrawable(getResources(),bm2);
LayerDrawable layerDrawable = new LayerDrawable(layers);
imgView.setImageDrawable(layerDrawable);
}