Hi guys,
I was asked by someone from a marketing team to take someone’s flash and do a small edit to it. They are using a flash movie at a trade show and need the movie to restart. I told them I’d take a look at the code and take care of it. I assumed it was going to be a simple task…just find the stop function and remove it.
Unfortunately, no actual work was done on the timeline, it was all coded in action script. On top of that, he used a plugin called “fuse” which I know nothing about. Anyway, all of the work was done in a separate .as file, which I will post here. If the solution is simple enough, could someone help me?
A thousand thanks,
import com.mosesSupposes.fuse.*;
import flash.filters.GlowFilter;
import com.actionscript.text.TextScript;
import com.darronschall.DynamicRegistration;
ZigoEngine.register(Fuse, PennerEasing);
var initStates = new Object();
initStates.logo = {
x:220, y:90, alpha:99
}
initStates.sky = {
x:0, y:0, alpha:0
}
initStates.sun = {
x:Stage.width/2.5, y:Stage.height+10, alpha:0
}
initStates.chipGuy = {
x:-150, y:Stage.height-100, alpha:20, scale:33
}
initStates.cloud1 = {
x:Stage.width-100, y:Stage.height-70, alpha:50, scale:60
}
initStates.cloud2 = {
x:Stage.width+600, y:Stage.height+60, alpha:65, scale:80
}
initStates.cloud3 = {
x:Stage.width+1000, y:Stage.height-100, alpha:80, scale:130
}
var box:MovieClip = this.attachMovie("box","box"+this.getNextHighestDepth(), this.getNextHighestDepth());
var sky:MovieClip = this.attachMovie("sky","sky"+this.getNextHighestDepth(), this.getNextHighestDepth(), {
_x:initStates.sky.x,
_y:initStates.sky.y,
_alpha:initStates.sky.alpha
});
var sun:MovieClip = this.attachMovie("sunRays","sun"+this.getNextHighestDepth(), this.getNextHighestDepth(),{
_x:initStates.sun.x,
_y:initStates.sun.y,
_alpha:initStates.sun.alpha
});
var globe:MovieClip = this.attachMovie("globe","globe"+this.getNextHighestDepth(), this.getNextHighestDepth(), {
_x:125,
_y:225,
_alpha:20,
_xscale:40,
_yscale:40
});
var cloud0:MovieClip = this.attachMovie("clouds","clouds"+this.getNextHighestDepth(), this.getNextHighestDepth(),{
_x:0,
_y:200,
_xscale:50,
_yscale:50,
_alpha:30
});
var binochMan:MovieClip = this.attachMovie("binochMan","binochMan"+this.getNextHighestDepth(), this.getNextHighestDepth(),{
_x:Stage.width,
_y:-20,
_xscale:150,
_yscale:150,
_alpha:0
});
var clouds:MovieClip = this.createEmptyMovieClip("clouds", this.getNextHighestDepth());
var cloud1:MovieClip = clouds.attachMovie("clouds","clouds"+this.getNextHighestDepth(), this.getNextHighestDepth(),{
_x:initStates.cloud1.x/2-50,
_y:initStates.cloud1.y,
_xscale:initStates.cloud1.scale,
_yscale:initStates.cloud1.scale,
_alpha:initStates.cloud1.alpha
});
var cloud2:MovieClip = clouds.attachMovie("clouds","clouds"+clouds.getNextHighestDepth(), clouds.getNextHighestDepth(),{
_x:100,//initStates.cloud2.x,
_y:initStates.cloud2.y,
_xscale:initStates.cloud2.scale,
_yscale:initStates.cloud2.scale,
_alpha:initStates.cloud2.alpha
});
cloud2._rotation=180;
var chipGuy:MovieClip = clouds.attachMovie("chipGuy","chipGuy"+clouds.getNextHighestDepth(), clouds.getNextHighestDepth(), {
_x:0,//-250,//initStates.chipGuy.x,
_y:20,//initStates.chipGuy.y,
_alpha:initStates.chipGuy.alpha,
_xscale:80,//initStates.chipGuy.scale,
_yscale:80//initStates.chipGuy.scale
});
var cloud3:MovieClip = clouds.attachMovie("clouds","clouds"+clouds.getNextHighestDepth(), clouds.getNextHighestDepth(),{
_x:0,//initStates.cloud3.x-100,
_y:initStates.cloud3.y,
_xscale:initStates.cloud3.scale,
_yscale:initStates.cloud3.scale,
_alpha:initStates.cloud3.alpha
});
cloud3._xscale *= -1;
var logoBox:MovieClip = this.createEmptyMovieClip("logoBox", this.getNextHighestDepth());
logoBox._alpha=0;
var logoGlow:MovieClip = logoBox.attachMovie("bh_marketplace","logo"+logoBox.getNextHighestDepth(), logoBox.getNextHighestDepth(),{
_x:initStates.logo.x,
_y:initStates.logo.y,
_alpha:initStates.logo.alpha
});
var logo:MovieClip = logoBox.attachMovie("bh_marketplace","logo"+logoBox.getNextHighestDepth(), logoBox.getNextHighestDepth(), {
_x:initStates.logo.x,
_y:initStates.logo.y,
_alpha:initStates.logo.alpha
});
// Creates a variable with info about the Filter settings
var myGlowFilter = new GlowFilter (0xffffff,0.6,20,20,3,3,false,true);
// Applies the filter to the object named myObject
logoGlow.filters = [myGlowFilter];
function skyLoader():Void
{
var f:Fuse = new Fuse();
f.push({target:sky, alpha:100, time:0});
f.push({target:logoBox, alpha:100, time:1, ease:"linear"});
f.push({target:logoBox, alpha:100, time:4, ease:"linear"});
f.push({target:logoBox, alpha:0, x:-900, y:-500, xscale:400, yscale:400, time:2});
f.start();
}
function sunLoader():Void
{
var f:Fuse = new Fuse();
f.push({target:sun, alpha:50, time:5, ease:"linear"});
f.start();
}
function sunSpinner():Void
{
var f:Fuse = new Fuse();
f.push({target:sun, rotation:360, time:100, ease:"linear"});
f.push({func:sunSpinner});
f.start();
}
function chipLoader():Void
{
var f:Fuse = new Fuse();
f.push({target:chipGuy, alpha:0, scale:95, x:-200, y:20, time:0, ease:"linear"});
f.push({target:chipGuy, alpha:100, scale:100, x:-150, y:15, time:2, ease:"linear"});
f.push({target:sky, x:00, time:3.5});
f.push({func:moveGlobe});
f.push({target:clouds, xscale:400, yscale:400, x:-800, y:-550, alpha:50, time:2, ease:"linear"});
f.push({func:function(){renderCaption(captionFormat, 'Extend the power and reach of Bullhorn');}});
f.push({target:sky, x:00, time:.5});
f.push({func:function(){renderHeadline(myFormat, 'with new applications');}});
f.push({target:sky, x:00, time:4});
f.push({func:moveCloud0});
f.push({func:function(){clearMessages();}});
f.push({target:sky, x:00, time:2});
f.push({func:moveBinoch});
f.push({target:clouds, xscale:800, yscale:800, y:-1200, x:-2000, alpha:0, time:2, ease:"linear"});
f.push({func:function(){clouds.removeMovieClip();}});
f.push({func:function(){renderCaption(captionFormat, 'Find the tools', -30);}});
f.push({target:sky, x:00, time:.5});
f.push({func:function(){renderHeadline(myFormat, 'you need now', -30);}});
f.start();
}
function moveBinoch():Void{
var f:Fuse = new Fuse();
f.push({target:binochMan, x:Stage.width-170, y:20, alpha:70, time:1, xscale:100, yscale:100, ease:"linear"});
f.push({target:binochMan, x:Stage.width-180, y:20, alpha:90, time:2, xscale:100, yscale:100});
f.start();
}
function moveGlobe():Void
{
var f:Fuse = new Fuse();
f.push({target:globe, x:-170, y:50, scale:80, alpha:75, time:2, ease:"linear"});
f.push({target:globe, x:-100, y:50, scale:80, alpha:50, time:2, ease:"linear"});
f.push({target:globe, x:00, y:60, scale:120, alpha:0, time:5, ease:"linear"});
f.push({func:function(){globe.removeMovieClip();}});
f.start();
}
function cloudLoader():Void
{
var f:Fuse = new Fuse();
f.push({target:clouds, x:1500, time:100, ease:"linear"});
f.push({func:cloudLoader});
f.start();
}
function moveCloud0():Void{
var f:Fuse = new Fuse();
f.push({target:cloud0, x:1000, y:180, yscale:60, xscale:60, time:50, alpha:80, ease:"linear"});
f.push({target:cloud0, x:-300, y:220, yscale:50, xscale:50, time:0, alpha:0, ease:"linear"});
f.push({target:cloud0, x:000, y:200, yscale:50, xscale:50, time:17, alpha:30, ease:"linear"});
f.push({func:moveCloud0});
f.start();
}
function moveCloud2():Void
{
var f:Fuse = new Fuse();
f.push({target:cloud2, x:1500, time:150, ease:"linear"});
f.start();
}
function moveCloud3():Void
{
var f:Fuse = new Fuse();
f.push({target:cloud3, x:1500, time:50, ease:"linear"});
f.start();
}
f.push({func:chipLoader});
chipLoader();
cloudLoader();
moveCloud2();
moveCloud3();
skyLoader();
sunLoader();
sunSpinner();
function grp():Number
{
return Math.random()*600;
}
var phrase:String = "Performance.";
var xLoc:Number = Stage.width/2;
var yLoc:Number = 110;
var delay:Number = 2;
var button:MovieClip = this.attachMovie('completeButton','completeButton_mc',5);
var headerContainer:MovieClip = this.createEmptyMovieClip('headerContainer_mc',this.getNextHighestDepth());
headerContainer._x=0;
headerContainer._y=-100;
headerContainer._width=728;
headerContainer._height=90;
headerContainer._alpha=100;
renderHeadline = function(format, headlineText, xshift){
if(!xshift) xshift = 0;
headerContainer.m = TextScript.blurIn(this, headlineText, Stage.width/2, yLoc, format, 1, slideIn);
headerContainer.m._x = (-5 + xshift) - (headerContainer.m._width/2);
}
clearMessages = function() {
TextScript.removeBlurIn(headerContainer.m, 1);
TextScript.removeBlurIn(headerContainer.n, .5);
TextScript.removeBlurIn(headerContainer.o, .5);
}
renderCaption = function(format, captionText, xshift){
if(!xshift) xshift = 0;
headerContainer.n = TextScript.blurIn(this, captionText, Stage.width/2, 90, format, .25, slideIn);
headerContainer.n._x = (-5 + xshift) - (headerContainer.n._width/2);
}
renderSecondCaption = function(format, captionText){
headerContainer.o = TextScript.blurIn(this, captionText, Stage.width/2, 67, format, .25, slideIn);
headerContainer.o._x = -5 - (headerContainer.o._width/2);
}
mask.onRelease = function(){
getURL(clickTag,'_blank');
}