Section 1
//BlowingBlade_9 (bobaduck_fla.BlowingBlade_9)
package bobaduck_fla {
import flash.display.*;
import flash.events.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class BlowingBlade_9 extends MovieClip {
public var init:Boolean;
public var len;
public var xform;
public var flip;
public var vel;
public var base;
public var ang;
public function BlowingBlade_9(){
addFrameScript(0, frame1);
}
function frame1(){
base = ((rotation * Math.PI) / 180);
ang = base;
vel = 0;
len = scaleY;
xform = this.transform.matrix;
flip = 1;
if (xform.a < 0){
flip = (flip * -1);
};
if (init == true){
return;
};
this.addEventListener(Event.ENTER_FRAME, function (_arg1){
advance();
});
init = true;
}
public function advance(){
var _local1:*;
_local1 = (Math.random() / 16);
if (!isNaN(MovieClip(parent).wind)){
_local1 = (_local1 + (MovieClip(parent).wind / 4));
};
ang = (ang + vel);
vel = (((vel * 0.875) + ((base - ang) / (8 * len))) + ((((flip * _local1) * Math.cos(ang)) / 4) / len));
rotation = ((ang * 180) / Math.PI);
}
}
}//package bobaduck_fla
Section 2
//Cloud_2 (bobaduck_fla.Cloud_2)
package bobaduck_fla {
import flash.display.*;
import flash.events.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Cloud_2 extends MovieClip {
public var init:Boolean;
public var spd;
public function Cloud_2(){
addFrameScript(0, frame1);
}
function frame1(){
if (init == true){
return;
};
this.addEventListener(Event.ENTER_FRAME, function (_arg1){
advance();
});
init = true;
spd = 1;
spawn();
y = (125 * Math.random());
}
public function spawn(){
var _local1:*;
gotoAndStop((1 + int((Math.random() * totalFrames))));
_local1 = (0.5 + (1 * Math.random()));
scaleX = _local1;
scaleY = _local1;
spd = (1 + ((1 + (1 * Math.random())) / (_local1 + 1)));
}
public function advance(){
var _local1:*;
_local1 = 0;
if (!isNaN(MovieClip(parent).wind)){
_local1 = (_local1 + (MovieClip(parent).wind / 4));
};
x = (x + (spd / 12));
if ((x - width) > 320){
spawn();
x = (0 - width);
y = (125 * Math.random());
};
}
}
}//package bobaduck_fla
Section 3
//Duck_5 (bobaduck_fla.Duck_5)
package bobaduck_fla {
import flash.display.*;
import flash.events.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Duck_5 extends MovieClip {
public var dur;
public var straw:MovieClip;
public function Duck_5(){
addFrameScript(0, frame1, 23, frame24, 39, frame40, 40, frame41, 69, frame70, 119, frame120);
}
function frame70(){
if (Math.random() <= (1 / 4)){
gotoAndPlay(1);
};
}
function frame1(){
}
function frame24(){
this.startSuck();
dur = (2 + (16 * Math.pow(Math.random(), 2)));
}
public function stopSuck(){
this.straw.sucking = false;
}
function frame40(){
if (dur > 0){
dur--;
gotoAndPlay((currentFrame - 2));
};
}
function frame41(){
this.stopSuck();
}
function frame120(){
if (Math.random() <= (1 / 4)){
gotoAndPlay(1);
} else {
gotoAndPlay(70);
};
}
public function startSuck(){
this.straw.sucking = true;
}
}
}//package bobaduck_fla
Section 4
//Leaftuftlet_4 (bobaduck_fla.Leaftuftlet_4)
package bobaduck_fla {
import flash.display.*;
import flash.events.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Leaftuftlet_4 extends MovieClip {
public var wght;
public var init:Boolean;
public var pos;
public var rustle;
public var R;
public var ctch;
public var vel;
public var base;
public function Leaftuftlet_4(){
addFrameScript(0, frame1);
}
function frame1(){
if (init == true){
return;
};
this.addEventListener(Event.ENTER_FRAME, function (_arg1){
advance();
});
init = true;
base = new Point(x, y);
ctch = ((width * height) / 100);
wght = (1 + Math.pow(((width * height) / 1000), 3));
R = (width / 8);
pos = new Point(0, (R / 8));
vel = new Point(0, 0);
rustle = 0;
}
public function advance(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = (Math.random() / 16);
if (!isNaN(MovieClip(parent).wind)){
_local1 = (_local1 + (MovieClip(parent).wind / 4));
};
if (!isNaN(vel.length)){
pos.offset((vel.x / 2), (vel.y / 2));
if (pos.length > R){
pos.normalize(R);
};
};
rustle = (rustle + ((_local1 * ctch) / 32));
rustle = (rustle * 0.8);
_local2 = Math.asin((pos.x / R));
_local3 = Math.asin((pos.y / R));
_local4 = Math.atan2(pos.y, pos.x);
vel.offset((((_local1 * Math.cos(_local2)) * (1 + (ctch / 2))) / wght), (((_local1 * (1 + (ctch / 2))) * Math.random()) / wght));
vel.offset((-(pos.x) / wght), (-(pos.y) / wght));
vel.offset(0, (1 / wght));
vel.normalize((vel.length * 0.975));
x = (base.x + pos.x);
y = (base.y + pos.y);
gotoAndStop((2 + int((16 * rustle))));
}
}
}//package bobaduck_fla
Section 5
//Scene_1 (bobaduck_fla.Scene_1)
package bobaduck_fla {
import flash.display.*;
import flash.events.*;
public dynamic class Scene_1 extends MovieClip {
public var wind;
public var gust;
public function Scene_1(){
addFrameScript(0, frame1);
}
function frame1(){
wind = 0;
gust = 0;
this.addEventListener(Event.ENTER_FRAME, function (_arg1){
advance();
});
}
public function advance(){
if (Math.random() <= (1 / 32)){
gust = (2 * Math.random());
};
gust = (gust + ((Math.random() - 0.5) / 32));
gust = (gust * 0.9);
wind = ((wind * 0.9) + (gust * 0.1));
}
}
}//package bobaduck_fla
Section 6
//Straw_6 (bobaduck_fla.Straw_6)
package bobaduck_fla {
import flash.display.*;
import flash.events.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Straw_6 extends MovieClip {
public var sucking;
public var b;
public var d;
public var airFlow;
public var bobas;
public var EC:MovieClip;
public function Straw_6(){
addFrameScript(0, frame1);
}
function frame1(){
this.addEventListener(Event.ENTER_FRAME, function (_arg1){
advance();
});
sucking = true;
airFlow = 0;
bobas = new Array();
d = 0;
while (d < 4) {
b = new Boba();
this.EC.addChild(b);
b.vel = 0;
bobas.push(b);
d++;
};
}
public function advance(){
var _local1:*;
var _local2:*;
airFlow = (airFlow * 0.75);
if (sucking){
airFlow = (airFlow + 5);
};
for (_local1 in bobas) {
_local2 = bobas[_local1];
_local2.y = (_local2.y + (_local2.vel / 4));
if (_local2.y < -30){
_local2.y = (4 + (8 * Math.random()));
};
_local2.vel = (_local2.vel + (1 - ((airFlow - _local2.vel) / 2)));
_local2.vel = (_local2.vel * 0.5);
if ((((_local2.y > 10)) && ((_local2.vel > 0)))){
_local2.y = (8 + (32 * Math.random()));
};
};
}
}
}//package bobaduck_fla
Section 7
//Boba (Boba)
package {
import flash.display.*;
public dynamic class Boba extends MovieClip {
}
}//package