forked from: colin challenge for amateurs(Ramen Chan)
forked from colin challenge for amateurs (diff: 134)
Draw a Tasty Ramen ! * * You can edit and modify every piece of this code. * Load more pictures of GU (ingredients of ramen) * from flickr or draw one by yourself. * Make it look tasty. *
ActionScript3 source code
/**
* Copyright civet ( http://wonderfl.net/user/civet )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/fLlF
*/
// forked from checkmate's colin challenge for amateurs
/*
*
* Draw a Tasty Ramen !
*
* You can edit and modify every piece of this code.
* Load more pictures of GU (ingredients of ramen)
* from flickr or draw one by yourself.
* Make it look tasty.
*
*/
package
{
import flash.display.*;
import flash.events.*;
import flash.filters.DropShadowFilter;
import flash.net.*;
import flash.text.*;
import flash.system.*;
[SWF(width="460", height="460", backgroundColor="0xFFFFFF", frameRate="30")]
public class FlashTest extends Sprite
{
private var RAMEN_URL :String = "http://farm3.static.flickr.com/2589/3787648401_0b3d62a314_o.png";
private var NARUTO1_URL :String = "http://farm3.static.flickr.com/2466/3787648415_1f857d46cf_o.png";
private var NARUTO2_URL :String = "http://farm4.static.flickr.com/3560/3788456920_5101174e6c_o.png";
private var MENMA_URL :String = "http://farm3.static.flickr.com/2628/3788456906_91e357245f_o.png";
public function FlashTest()
{
stage.scaleMode = StageScaleMode.NO_SCALE;
stage.align = StageAlign.TOP_LEFT;
draw();
}
private function draw():void
{
var loader:Loader = new Loader();
loader.load(new URLRequest(RAMEN_URL));
addChild(loader);
loader = new Loader();
loader.load(new URLRequest(NARUTO2_URL));
loader.x = 270;
loader.y = 200;
loader.scaleX = 0.4;
loader.scaleY = 0.4;
loader.rotation = 8;
addChild(loader);
loader = new Loader();
loader.load(new URLRequest(NARUTO2_URL));
loader.x = 90;
loader.y = 195;
loader.scaleX = 0.4;
loader.scaleY = 0.4;
loader.rotation = 15;
addChild(loader);
var shape:Shape = new Shape();
addChild(shape);
shape.x = 65;
shape.y = 50;
shape.scaleX = shape.scaleY = 2;
var g:Graphics = shape.graphics;
//1
g.beginFill(0xeeeeee);
g.drawEllipse(50, 50, 16, 30);
g.endFill();
//2
g.beginFill(0xeeeeee);
g.drawEllipse(50 + 50, 50, 16, 30);
g.endFill();
//1
g.lineStyle(2, 0xeeeeee);
g.moveTo(50, 50);
g.curveTo(50, 60, 60, 60);
//2
g.moveTo(50 + 50, 50);
g.curveTo(50 + 50, 60, 60 + 50, 60);
//3
g.moveTo(75, 115);
g.curveTo(85, 136, 95, 115);
//4
g.moveTo(30, 100);
g.lineTo(32, 95);
g.moveTo(40, 100);
g.lineTo(42, 95);
g.moveTo(50, 100);
g.lineTo(52, 95);
//5
g.moveTo(110, 100);
g.lineTo(112, 95);
g.moveTo(120, 100);
g.lineTo(122, 95);
g.moveTo(130, 100);
g.lineTo(132, 95);
//rect
var balloon:Sprite = new Sprite();
g = balloon.graphics;
g.beginFill(0xffffff);
g.drawRoundRect(0, 0, 100, 48, 24);
g.beginFill(0xffffff);
g.moveTo(70, 48);
g.lineTo(70, 60);
g.lineTo(55, 48);
g.endFill();
var label:TextField = new TextField();
label.defaultTextFormat = new TextFormat("Verdana", 24, 0, true);
label.text = "Oisii!!";
label.x = 6;
label.y = 8;
balloon.addChild(label);
balloon.x = 40;
balloon.y = 60;
addChild(balloon);
balloon.filters = [new DropShadowFilter(4.0, 45, 0x333333)];
}
}
}