Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Tween Gradient In Fuse



Hi.I've a background gradient and would like to tween the top color to another when clicking a button.I think FuseKit 2.1 can do this, but can't find figure out how. :? This is how i generated my gradient:Code: var mc:MovieClip = this.createEmptyMovieClip("fundo",this.getNextHighestDepth());var bgcolors:Array = [0x00A6D6, 0xFFFFFF];drawBackground(bgcolors,mc);button1.onRelease = function(){   /*   * ????   */}function drawBackground(myColors:Array,mc:MovieClip){   var wSize:Number = Stage.width;   var hSize:Number = Stage.height;   var fillType:String = "linear";   var alphas:Array = [100, 100];   var ratios:Array = [0, 255]   var matrix:Object = {matrixType:"box", x:0, y:0, w:wSize, h:hSize, r:90/180*Math.PI};      mc.lineStyle(1, 0xFFFFFF, 0);   mc.beginGradientFill(fillType, myColors, alphas, ratios, matrix);   mc.lineTo(wSize, 0);   mc.lineTo(wSize, hSize);   mc.lineTo(0, hSize);   mc.lineTo(0, 0);   mc.endFill();   }Any tips, hints?



Actionscript 2.0
Posted on: Thu Mar 01, 2007 10:24 pm


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Tween Brightness With Fuse ?
That's basically it, how do I tween brightness with fuse ?

I tried

var f:Fuse = new Fuse({brightness:100, time:2})
f.target = this
f.start()

and it doesn't work for me

I tried brightOffsetTo and stll nothing


Cheers guys !

Fuse Brightness Tween
Hey there,

I've been trying to work out how to create a 'wash-out' effect using fuse. Now, I did work out how to wash it out to white, but I also want to make it go the opposite (washout to black).

This works to wash it out to white:


ActionScript Code:
import com.mosesSupposes.fuse.*;ZigoEngine.simpleSetup(Shortcuts, PennerEasing);myMC.colorTransformTo(255, 255,255, 255, 255, 255, 100, 100, 1, None.easeNone);


I've been playing with the numbers, but just can't get it to go to black? Any ideas anyone?

Fuse ?: Can You Have A Midpoint In Your Tween?
I'm rather new to Fuse and a novice of sorts at Actionscript. Anyway, I was wondering how would I write a Fuse tween that does the following:

The event would start w/ a mouseover. Then over a period of time (let say 1 second) blurs a legible peice of text beyond recognition and then returns it to legible over that one second. Can that be done with one Fuse action, If so how.

Oh yeah one other thing when the text unblurs I want it to be bold.

Any thought that can get me started in the right direction?

[F8] Fuse Question About A Midpoint In The Tween
I'm rather new to the Fuse class (mosessupposes.com/Fuse) and a novice of sorts at Actionscript. Anyway, I was wondering how would I write a Fuse tween that does the following:

The event would start w/ a mouseover. Then over a period of time (let say 1 second) blurs a legible peice of text beyond recognition and then returns it to legible over that one second. Can that be done with one Fuse action, If so how.

Oh yeah one other thing when the text unblurs I want it to be bold.

Any thought that can get me started in the right direction?

Tween / Tweener / Fuse / EnterFrame
Tween,
or Tweener,
Tweenest? : )
or Fuse
or onEnterFrame functions

I can't sort which one is the most cpu friendly + will result in smoother tweens with pixel data (don't mean the Bitmap class, just jpg's).

Does anyone have an idea about it? I know Fuse lets you do so many extra things but that's not the issue now. By the way I have experienced serious delay problems with timeline based animations during the action of Tween and Tweener objects. I'm trying to get rid of it, is it possible?

As always... Thanks in advance.

[a footnote: Has anyone discovered code.google.com yet? I have just discovered it]

Fuse Vs Tween Lite (looking For Opinions)
I have a project coming up requiring me to animate a group of clips in precise sequences for a number of banner ads. I thought it might be a good time to familiarize myself with the various tweening techniques. For those with experience with this sort of thing I'm curious to hear which of the two tweening engines might be preferred for the task, and maybe which of the two might be easier to learn for this sort of thing.

Thanks / help appreciated

OnComplete With Fuse/Zigo Tween
Hello,

This is my first post and my first day even touching actionscript beyond the typical behaviors such as buttons or loading an external movie.

I trying to learn tween via AS. Fuse first and then Tweener. I'm not sure which is easier to learn, but neither have a 'dummies' book and constructors, events, objects and hoot-nanny just confuse me.

I have a series of tweens using Fuse and at the end I want it to go to frame three, but not before. See below:


Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts,PennerEasing,Fuse);

// start faded down with alpha of 0
textMenu._alpha = 0;
// fade to 100, over 1 second with a 1 second delay
textMenu.alphaTo (100,1,"easeOutBack",1);
// start faded down with alpha of 0
bg_radialGrey_mc._alpha = 0;
// fade to 100, over 1 second with a 1.5 second delay
bg_radialGrey_mc.alphaTo(100,1,"easeOutQuad",1.5);
// start faded down with alpha of 0
ftrTag_mc._alpha = 0;
// fade to 100, over 1 second with a 2 second delay
ftrTag_mc.alphaTo(100,1,"easeInQuad",2);

// go to next frame onComplete, but I'm not sure how, its all Greek to me
gotoAndStop(3);
The tweens work perfectly, its great not to mess with the timeline for the simple stuff, but everything basically runs at the same time.

I'd appreciate your help or any direction you could give and if you know of a site that has detailed examples. Notice I have to comment my code like crazy or I get lost.

Thank you and have a great weekend.

Fuse Vs Tween Lite (looking For Opinions)
I have a project coming up requiring me to animate a group of clips in precise sequences for a number of banner ads. I thought it might be a good time to familiarize myself with the various tweening techniques. For those with experience with this sort of thing I'm curious to hear which of the two tweening engines might be preferred for the task, and maybe which of the two might be easier to learn for this sort of thing.

Thanks / help appreciated

Using Zigo Tween Class En Fuse
hi,

fuse kit and zigo tween class...

is it lame to use a little or is it really re-inventing the wheel to not use it?

New Fuse-like Tween Engine Based On Go ASAP
Hi,
if you liked Fuse, you should have a look on Tweego:
http://code.google.com/p/tweego/

Tweego is a well structured and powerful engine and can be used like Fuse.
It's based on the Go ASAP by Moses Gunesch (Author of Fuse).
For complex tweens and sequence controlling this system is perfect.


Code:
var t:Tweego = new Tweego;
t.push({target: target, x: 100, y: 200, time: 1, ease: Bounce.easeOut});
t.push({delay: 2});
t.push({target: target, width: 500, time: .5, ease: Elastic.easeOut, func: onComplete});
t.start();


So have a look and please give me feedback Thanks a lot

s

Tween Classes (laco, Zeh, Fuse) On Cdrom
hi, i did a search for this but cant found nothing. Im working on a cdrom where some mcs are animated with zeh tween class (mctween2.as) and im wondering about if it works in any computer. Should i include some of the files used for the class (by the way, i have no idea where that files are and where should be on the cdrom)
Any tip would be apreciated.
thanks.

Tween And Transition Classes In Flash Vs Fuse K
I'm wondering if there's a hughe difference between use Fuse and use the Tween and Transition Classes in Flash MX, I mean a difference in the PC of the common user of a website.
I made some tests and for example, using a tween and the easing class to move a MovieClip (ball_mc) from one point to other, its 3Kb, and using fuse it's 18 Kb.

What are you using out there?

Can You Tween/fuse Abitmap Data Class Tile?
Hi!

I have watched Lee's bitmap data class tutorial (Full Browser Flash) and have created my own tiled background:

Code:

import flash.display.BitmapData;

var tile2:BitmapData = BitmapData.loadBitmap ("tile2");

function fillBG2() {
   this.beginBitmapFill(tile2);
   this.moveTo(0,245);
   this.lineTo(Stage.width,245);
   this.lineTo(Stage.width,439);
   this.lineTo(0,439);
   this.lineTo(0,245);
   this.endFill();
}
fillBG2();

However, this just displays the tile when the frame is played. I would like to create a tween (preferrably fuse kit) to fade the tiled background over the old one... something like:

Code:

var f7:Fuse = new Fuse();
f7.push ({target:fill,start_alpha:0,alpha:100,seconds:1,ease:"easeOutQuad",func:afterFuse});
f7.start();

Is this possible? How do I stop the bitmap tile from appearing automatically and how do I assign it to a target for the fuse tween?

Please help!

Thanks, Matthew.

Gradient Tween?
I was wondering how i could get a gradient fill to stretch the movie and then disapear? Would this be a gradient tween?

Thanks

Styro

Gradient Tween In As2
Hi all

wondered if someone could help me. What i would like ot be able to do is to be able to tween the colour of a gradient that i am creating dynamically. Bascially there will be six primary navigation elements. and im after how to tween the colours between each of the six areas. Can anyone point me in the right direction on how to approach htis please?

thx in advance

ade

Shape Tween W/ Gradient?
My shape tweens when i'm using a gradient look just fine when they are in flash and when i go to publish them the gradient doesn't look the same. Any ideas as to why its doing this? Thanks

Gradient Tween On Button? HELP PLZ
All I want is a black button with a silver gradient and I want the mouseover to make the gradient tween to create a reflection/shining effect. Please help me.

MC Gradient Alpha Tween
Is it possible to tween the Alpha properties of a movie clip, if the graphics of the movie clip has a gradients?

Gradient Masking With Motion Tween Problem
i am trying to reveal an image with gradient masks.

1. i create an image layer, convert to movieclip, give an instance name "flower_maskee"
2. i create a new layer with a radial gradient circle (0 alpha on one and, 100 alpha on the other), convert to movieclip, give an instance name "oval_mask1", create a motion tween so the mask appears smooth.
3. same as above, but give an instance name "oval_mask2".
4. add actionscript:

flower_maskee.setMask(oval_mask);
flower_maskee.setMask(oval_mask2);

the first mask layer works fine, the second does not??

fla link

From Gradient Dynamic Text, To Gradient Dynamic Image.
Earlier I had a huge struggle getting to be able to place a gradient on Dynamic text, where the text is entered using Action Script. I figured it out though. Now I am wanting to place a gradient fade on a Dynamic Image, using loadMovie.

Here is the code I used for Dynamic Text Gradient

Code:
OS.text_mc.dtext.text ="woot"
OS.mask_mc.setMask(OS.text_mc);
I tried to change it to loadMovie, and place a jpg image into the same folder as the .swf but it isnt gradienting. I get the image, just no gradient. Some help would be much appreciated.

Here is the FLA to the Dynamic Text Gradient:
GradientText.fla

I Use Fuse
Check out the public release of Fuse 1.1z. It's a great script based animation engine (tween engine) that's easy to use and very powerful!

http://www.mosessupposes.com/Fuse/index.html

NICE!!!

Fuse Anyone?
well I don't know if it's appropriate to post fuse related stuff on this forum but what the hell. The fuse forum is pretty comatose.

so here goes. What I want to do in fuse is animate a parameter and then while that animation is still taking place, animate another parameter of the same MC.
So in this simple example I'm rotating a MC called "ball" 720 degree over a period of 4 seconds with a 2 second delay before it all happens. Say I wanted to move the ball or change it's alpha or something 4 seconds into the animation(ie in the middle of the rotation tween. How would I do that? I've tried creating a new fuse object which talks to the same MC but not luck, just does one. If you push any further commands into the array then it executes them one after the other.

So any clues how I would do this?(in fuse mind you, I know I could do it with something else like the tween class but that's not the point)

here is the code:

import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse,PennerEasing,FuseFMP);
var h:Fuse = new Fuse();
h.push({target:ball, _rotation:720, seconds:4, ease:"easeOutQuad", delay:2});
h.start();

AS3 Have Anything Like Fuse
Does AS3 have anything like fuse for tweening say position (x, y) or alpha?

Also, is there a new Fuse for AS3? I tried creating a new Fuse object in my documentClass and it blew up my app so bad the ceiling had pieces of my app on it!

If there is no new Fuse and AS3 doesnt have anything like it then can anyone recomment a good 3rd party AS3 tween Class?

Thanks, Dvl

Fuse In AS3
anyone know if there will be a fuse 3 version ?? or fuse to AS3 ???

thanks

Help With Fuse?
so a few days ago i posted a question about how to tween from one coordinate to another smoothly upon the press of a button, one person responded "its easy - do it with fuse" so now i got fuse - but i dont know what to do.

what i am trying to do is get a website similar to this guys - http://www.vermeersch.ca/ does anyone know how he did it - and if he used fuse- where can i find a good tut to show me how, - thanks
craig

Fuse Kit Anyone?
Hi people, I've been trying all day to install the Fuse Kit from mosessupposes.com without luck.

when I try to include the libraries I always get this message


Quote:




**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Error opening include file fuse_lite.as: File not found.
#include "fuse_lite.as"




I know I have to setup my classpath, but somehow that is not working... so: can anyone point me to a tutorial for installing the Fuse Kit or explaining me how can I do it?

Fuse Kit
Wondering if there would be any fuse kit tutorials in the near future.
There's limited help to be found on the subject, and what documentation there is, seems to be directed to more advanced actionscripters.

I'm just having trouble getting my head around it all, it seems way more complex than the old lacos tweens (which i was somewhat okay with).

Just if someone can help point me in the direction of a good tutorial or anything that'd be much appreciated.

Thanks

Fuse Kit Anyone?
Hello - I have a movie-clip that contains a fuse kit action which I’m trying to load into another move. This action is done through a button and when a continually press the button it will get hick-ups and load the movie without starting the fuse, but then it starts a few seconds later (delay not intended).

Is there a fix for this issue?

Thanks

CG

Here is my code:

Main Movie:

import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts,PennerEasing,Fuse );

left_mc._alpha=0;
middle_mc._alpha=0;
nav_mc._alpha=0;
who_mc._alpha=0;

nav_mc.why_btn.whyblue_btn._alpha=0;
nav_mc.what_btn.whatblue_btn._alpha=0;
nav_mc.want_btn.wantblue_btn._alpha=0;

Fuse.openGroup();

left_mc.fadeIn(1,easy, .35);
middle_mc.fadeIn(1,easy, .45);
who_mc.fadeIn(1,easy, .65);
nav_mc.fadeIn(2,easy, .95);


Fuse.closeAndStart();



function loadSection1() {
loadMovie("who.swf", blank_mc);
loadMovie("who_txt.swf", blank2_mc);
}

var who = new Fuse (
{ func:"loadSection1"}
);






Main Movie Button:

on (press){
who.start();
}



External Movie:

import com.mosesSupposes.fuse.*;
ZigoEngine.simpleSetup(Shortcuts,PennerEasing,Fuse );

who_mc._alpha=0;

Fuse.open();

who_mc.fadeIn(2,easy);

Fuse.closeAndStart();

How Can I Do It With FUSE ?
hi USers, i need to do this, what is in my code, with FUSE, right now im using onEnterFrame, and i dont like it that much cause the cou usage

ok, this is the curent code:


ActionScript Code:
onClipEvent (enterFrame) {
    mov = ((_width/2)*(-_xmouse))/Stage.width/2;
    _x = mov;
}


and maybe give it ease too

somebody knows how to do this better?

thanks!

About Fuse
Does anyone know how I would use fuse with the custom easing tool 2? I am new to fuse and actionscript, and I need a walk through on what to do first. I know some basic actionscript but am clueless when it comes to fuse. The go to and learn tutorial didn't really help me much because the way he annitiated fuse was confusing to me.

Fuse 2.0
Hey guys,
Happy Saturday! Weather's gorgeous where I'm at. Blue skies, about 85 degrees. And here I am working :cry:

So, just a crapshoot, but does anyone happen to have a copy of Fuse 2.0 beta they can shoot me?

Thanks to Lee, I am now addicted to Fuse. The tween sequencing just saves a ton of work. The only thing I don't like about it(and I kind of need right now) is that version 1.1 doesn't support controlX and controlY properties for bezier tweening.

I've even tried combining MCtween2 and Fuse, but I just can't get everything to work right.

Thanks in advance.

[CS3 + AS2] SWF Transitions And Fuse ... Help
Hi again everyone,

So I'm working on my personal website, and I decided to get clever and try to combine Kirupa's SWF transition tutorial with Fuse 2.1. For the sake of this problem, here is a quick map of the SWF structure I'm looking to use:


Code:
Main SWF - logo, main navigation (not created yet)
|_ Works SWF (aka Portfolio) - Framework for loading the ...
|_ Individual portfolio entries SWFs


Now here's the thing: adapting Kirupa's tutorial a tiny bit, I decided to animate the intro and outro transition animations in each individual portfolio entry SWF with Fuse, rather than on the timeline. For reference, in the root timeline of those SWFs is an include for the ActionScript file for the intro animations, and inside a movie clip - in the midframe actions - is an include for the outro animations AS file.

The problem I'm having is that I can't get the buttons that link to the individual projects to work after one has been clicked. For example, there are two buttons there - Not Worth It and Tourist Organisation of Belgrade - that are linked to the corresponding project SWFs. Clicking on of them will load that project, but when you try to click the other, nothing happens.

In any case, here's a link to all of the FLA, SWF, AS and XML files:

http://www.neueweb.com/downloads/works.zip (fair warning: the zip file is about 20 megs ... )

Help with this problem would be _greatly_ appreciated. Also, if someone could kindly have a look at all of this to see if the outro animations will work the way I've got them set up, or what I would have to do to make them work, it would also be greatly appreciated!

Cheers,
X.

Fuse Kit, I Need Delay
Dear friends, I'd use fuse from about 4 hour...

And I've try to do a simple effects on my "img1_mc" moivie clip:


this.img1_mc._alpha = 0;
this.img1_mc.alphaTo("100",1.5,"easeInQuad");
this.img1_mc.scaleTo (120,2,"easeOutQuint");
this.img1_mc.slideTo(-50, -50, 1, "easeInQuint");
this.img1_mc.slideTo(-20, -50, 10, "easeOutQuint");


Untill here all are ok... but now I need to add an effect (alpha out to 0) after "x" (about 15 seconds) delay seconds:

this.img1_mc.alphaTo("0",1.5,"easeOutQuad");

I've try to use this but I see that the movie clip become soon alpha 0.
I know that I need to use a delay command... How I can do?

thanks

Fuse Is Out - Public.
since i haven't seen anyone mention this yet, Moses just a few days ago made his latest release public so you can now download it by just clicking a link on his site, and the forum is open to the public.

http://www.mosessupposes.com/Fuse/

for those who haven't heard about this, this is a great soft that extends flash's tweening capabilities for animation or any movement, based on Zigo Tweening Prototypes that's great for designers as well as developers of any level - and its free! more on the site.

best

Fuse Class
I was wondering how you could use mosesSupposes fuse class to execute the commands simultaneously, not by line.


Code:
var x:Fuse = new Fuse();
x.push({target:nav5, rotation:0, size:140, alpha:20, x:postop+postop*0, y:100, time:0.5, ease:"easeOutExpo"});
x.push({target:nav2, rotation:0, size:140, alpha:20, x:postop+postop*1, y:100, time:0.5, ease:"easeOutExpo"});
x.push({target:nav3, rotation:0, size:140, alpha:20, x:postop+postop*2, y:100, time:0.5, ease:"easeOutExpo"});
x.push({target:nav6, rotation:0, size:140, alpha:20, x:postop+postop*3, y:100, time:0.5, ease:"easeOutExpo"});
x.push({target:nav4, rotation:0, size:140, alpha:20, x:postop+postop*4, y:100, time:0.5, ease:"easeOutExpo"});
x.start();
when x.start() is executed, the pushes are executed one by one, one after another finishes. how can u animate them simultaneously? Tnx

Playing With Fuse
http://www.ostari.com/ronnie/tweenbtns/

simple little buttons made with fuse kit

Fuse Elipse?
I am pretty new to Fuse so I want to know if anyone knows if I can use Fuse to make an object travel in an eliptical path. Sort of how you can use guides to do it in a timeline animation.

Thanks, Dvl

Using BlurTo In Fuse
How do make the blur quality the higest quality?

FUSE / ZIGO Anyone?
Does anyone know where I can get the fuse / zigo 1.1 package. it's listed here on moses g's site: http://www.mosessupposes.com/Fuse/index.html but there isn't any links for download.. not even for previous versions.. what the hell?

BrightOffset With Fuse
Hello all Kirupians!

Does anyone here know how to animate brightoffset from 100 to 0 with fuse? I manage to make it from 0 to 100 like this:

ActionScript Code:
f.push([{target:mc, brightOffset:100, seconds:2, ease:'easeInOutCubic'}]);

How to do it the other way around??

Sumo

Problem Using Fuse
I just cant get it to import!


Code:
**Error** Scene=Scene 1, layer=actions, frame=1:Line 1: Syntax error.
import com.mosesSupposes.fuse.*

Total ActionScript Errors: 1 Reported Errors: 1
It will work in other documents though!?!?

have i done anything wrong in that one line?

Playing Around With Fuse
made some quick little nav/btn things..turned out kinda cool

http://www.ostari.com/ronnie/tweenbtns/

Fuse SlideShow
Hey there,

Ok, so forgive me, I'm very new to Fuse, but it seems like the way to push forward. I'm trying to create a simple slidshow of 6 images with some text that fades in and out, then it moves on to the next slide.

I'm not quite sure what I'm doing wrong, but I can tell that its something to do with trying to reuse a Fuse object with a new MC.

Heres my code, if anyone has any suggestions, that'd be killer!


ActionScript Code:
import com.mosesSupposes.fuse.*;ZigoEngine.register(Fuse,PennerEasing,FuseFMP);var fbot:Fuse = new Fuse();var ftext:Fuse = new Fuse();var ftop:Fuse = new Fuse();function afterFuse():Void{    trace("fuse complete");}var current:Number = 1;var newDepth:Number = 0;var topImageLoaded:Boolean = false;function showFirstImage(){    newDepth++;    _root.attachMovie('image'+current, 'image' + newDepth, newDepth);    imageName = this['image'+newDepth];        fbot.push({target:imageName, start_alpha:0, end_alpha:100, seconds:2, ease:"linear", func:showText});    fbot.start();}function showTopImage(){        if(current<6){        current++;    } else {        current = 1;    }        newDepth++;        _root.attachMovie('image'+current, 'image' + newDepth, newDepth);    imageName = this['image'+newDepth];        ftop.push({target:imageName, start_alpha:0, end_alpha:100, seconds:2, ease:"linear", func:showText});    ftop.start();}function showBottomImage(){        if(current<6){        current++;    } else {        current = 1;    }        newDepth++;        _root.attachMovie('image'+current, 'image' + newDepth, newDepth);    imageName = this['image'+newDepth];            fbot.push({target:imageName, start_alpha:0, end_alpha:100, seconds:2, ease:"linear", func:showText});    fbot.start();}function showText(){    trace('goin');    newDepth++;    _root.attachMovie('line'+current, 'line'+newDepth, newDepth);    textName = _root['line'+newDepth];    textName._x = 380;    textName._y = 270;    FuseFMP.writeFilter(textName, "Blur", {blurY:50, blurX:50, quality:1});    ftext.push({target:textName, end_alpha:100, Blur_blurX:0, Blur_blurY:0, seconds:1, ease:"linear", func:startTimer});    ftext.start();}function startTimer(){    var timer:Number = setInterval(hideText, 3000);}function hideText():Void {    clearInterval(timer);        ftext.push({target:textName, end_alpha:0, Blur_blurX:50, Blur_blurY:50, seconds:1, ease:"linear", func:chooseImage});    ftext.start();}    function chooseImage(){    if (topImageLoaded){        showBottomImage();    } else {        showTopImage();    }}showFirstImage();

Fuse Troubles
I know that many are moving to AS3 but I'm still wrapping my head around AS2 (even though I'm now using Flash CS3).

Anyway, I have set a challenge for myself involving Fuse. I've made some mods to a script that deals with a button array (see ButtonTest1.swf attached). The code for that is below. All works as expected.

ButtonTest2.swf does not. That code is the same as below except the commented out sections are put in. The trouble is that when the user clicks on a button, it scales down and even sometimes pulses. I don't understand how a simple colorTo can mess up the scaleTo's?


Code:
import com.mosesSupposes.fuse.*;
// set up zigoEngine
ZigoEngine.simpleSetup(Shortcuts);

// declare the variable that will be the button that is clicked (MovieClip)
var buttonClicked:MovieClip;

// create the array to hold all the names of the movieClips
var myButtonsArray:Array = new Array(this["myButton0"], this["myButton1"], this["myButton2"]);

//
myButton0.onRelease = function():Void {
// set the buttonClicked to this
buttonClicked = this;
// run the scale buttons down function
scaleButtonsDown(exception);
// create the variriable that we pass into the scaleButtonDown func
var exception = this;
};
//
myButton0.onRollOver = function():Void {
// run scale buttons up func and pass in this
scaleButtonsUp(this);
};

//
myButton0.onRollOut = function():Void {
// run scale buttons down function
scaleButtonsDown();
};
//
myButton1.onRelease = function():Void {
buttonClicked = this;
var exception = this;
scaleButtonsDown(exception);
};
//
myButton1.onRollOver = function():Void {
scaleButtonsUp(this);
};
//
myButton1.onRollOut = function():Void {
scaleButtonsDown(null);
};
//
myButton2.onRelease = function():Void {
buttonClicked = this;
var exception = this;
scaleButtonsDown(exception);
};
//
myButton2.onRollOver = function():Void {
scaleButtonsUp(this);
};
//
myButton2.onRollOut = function():Void {
scaleButtonsDown(null);
};

// scale buttons down function
scaleButtonsDown = function ():Void {
// loop through myButtonsArray
for (var i:Number = 0; i<myButtonsArray.length; i++) {
// scale all buttons down over a .5 second period
myButtonsArray[i].scalerCrc.scaleTo(100, .5);
myButtonsArray[i].scalerTtl.scaleTo(100, .5);
//myButtonsArray[i].scalerCrc.colorTo(0xFFCCCC,.5);
//color change over .5 seconds

// make the buttonClicked scale to 100 over .5 seconds
}
buttonClicked.scalerCrc.scaleTo(150, 0);
buttonClicked.scalerTtl.scaleTo(200, 0);
//buttonClicked.scalerCrc.colorTo(0xFF0033);
};

// scale buttons up function
scaleButtonsUp = function (args):Void {
// scale the args (remember the button passed in this) to 200/150 over .5 seconds
args.scalerCrc.scaleTo(150, .5);
args.scalerTtl.scaleTo(200, .5);
//args.scalerCrc.colorTo(0xFF0033,.5);
//color change over .5 seconds
};

// scale all buttons down at start of movie
scaleButtonsDown();
Any help, would be greatly appreciated

Fuse Kit, I Need Delay
Dear friends, I'd use fuse from about 4 hour...

And I've try to do a simple effects on my "img1_mc" moivie clip:


this.img1_mc._alpha = 0;
this.img1_mc.alphaTo("100",1.5,"easeInQuad");
this.img1_mc.scaleTo (120,2,"easeOutQuint");
this.img1_mc.slideTo(-50, -50, 1, "easeInQuint");
this.img1_mc.slideTo(-20, -50, 10, "easeOutQuint");


Untill here all are ok... but now I need to add an effect (alpha out to 0) after "x" (about 15 seconds) delay seconds:

this.img1_mc.alphaTo("0",1.5,"easeOutQuad");

I've try to use this but I see that the movie clip become soon alpha 0.
I know that I need to use a delay command... How I can do?

thanks

Rough Use Of Fuse--Really Useful
Hey all, I just wrote a simple function that decorates a movieClip with some properties that make it really easy to extend the use of the FuseKit tweening methods and I was hoping to get some input. Remember, I just wrote this a minute ago, so there are, without doubt, a lot of improvements to be made. I would love any suggestions/input/corrections anyone can offer.


Background:

The way I see it is that the majority of tweening that I do involves tweening from one state to another using some method. So I wrote this simple routine to encapsulate my "states" and "means" so that I could use the syntax:

ActionScript Code:
myMovie.tweenToState("minimized","quickly");


and it would in effect do the following:

ActionScript Code:
ZigoEngine.doTween(this, ["_alpha, _x, _y, _size, Blur_blur, _brightness"],[50,Stage.width-this._width, Stage.height-this._height,20,8,50],1,"easeOutExpo",0);


The big advantage, of course being that once I defined the states and means for an object, they could be re-used again and again.

I also added the functionality to pass a movieClip object from which I would copy it's parameters and tween to the it.


ActionScript Code:
myMovieClip.tweenToOther(this.tinyMovieClip, "eventually");


I have alread come up with a million ways to extend this and hope to make it into a Fuse Extension, but right now I just wanted to get some input on it:

here's the code:

ActionScript Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse,FuseFMP,Shortcuts,PennerEasing);
 
function useStateMeans() {
    if (this.stateProps) {
        delete this.stateProps;
    }
    this.stateProps = new Object();
    this.registerState = function() {
        if (arguments.length == 1) {
            var name:String = arguments[0].name;
            var config:Object = arguments[0];
            delete config.name;
        } else if (arguments.length == 2) {
            var name:String = arguments[0];
            var config:Object = arguments[1];
        } else {
            var config:Object = new Object();
            var name:String = arguments[0] || "default";
            var propCount:Number = arguments.length;
            for (var i = 1; i<propCount; i++) {
                config[i] = arguments[i];
            }
        }
        this.stateProps[name] = config;
    };
    this.meansProps = new Object();
    this.registerMeans = function() {
        if (arguments.length == 1) {
            var name:String = arguments[0].name;
            var config:Object = arguments[0];
            delete config.name;
        } else if (arguments.length == 2) {
            var name:String = arguments[0];
            var config:Object = arguments[1];
        } else {
            var name:String = arguments[0] || "default";
            var time:Number = arguments[1] || 1;
            var ease:String = arguments[2] || "linear";
            var delay:Number = arguments[3] || 0;
            var callback:String = arguments[4] || "trace (this+' has finished using this means: "+name+"');";
            var config:Object = {time:time, ease:ease, delay:delay, callback:callback};
        }
        this.meansProps[name] = config;
    };
    var config = arguments[0];
    var t:Number = config.time || 1;
    delete config.time;
    var e:String = config.ease || "linear";
    delete config.ease;
    var cb:String = config.callback || "trace ('tween complete for '+this);";
    delete config.callback;
    var d:Number = config.delay || 0;
    delete config.name;
    delete config.delay;
    this.removeState=function (name:String) {
        delete this.propsConfig[name];
    }
    this.registerMeans("default",{time:t, ease:t, delay:d, cb:c});
    trace(this+" is ready to use meansFX");
    if (!config) {
        config = {_alpha:0, _visible:false};
    }
    this.registerState("default",config);
    trace(this+" is ready to use statesFX");
    this.tweenToState = function(stateName:String, meansName:String) {
        var propsConfig:Object = this.stateProps[stateName];
        var meansConfig:Object = this.meansProps[meansName];
        var meansDefault:Object = this.meansProps["default"];
        var props:Array = new Array();
        var vals:Array = new Array();
        var time:Number = meansConfig.time || meansDefault.time;
        var delay:Number = meansConfig.delay || meansDefault.delay;
        var ease:String = meansConfig.ease || meansDefault.ease;
        var callback:Object = meansConfig.callback || meansDefault.callback;
        for (var propName in propsConfig) {
            props.push(propName);
            vals.push(propsConfig[propName]);
        }
        ZigoEngine.doTween(this,props,vals,time,ease,delay,callback);
    };
    this.tweenToOther=function (mc:MovieClip, means:String) {
        var name:String = "temp_"+mc._name;
       
        if (propsConfig[name]!=undefined) {
            var incr:Number=1;
            while (this.propsConfig[name]!=undefined) {
                name+="_"+incr.toString();
                incr++;
            }
        }
        var config:Object=new Object();
        var props:Array = ["_alpha","_width","_height","_x","_y","_tint","_brightness","_brightOffset"];
        for (var p in props) {
            var propName:String = props[p];
            config[propName]=mc[propName];
        }
        this.registerState(name, config);
        var meanstype:String = means||"default";
        this.tweenToState(name, "bounce");
        this.removeState(name);
    }
       
}
MovieClip.prototype.useStateMeans = useStateMeans;


Jase

Fuse Not Working
i am building a site is supposed to function as follows:

when you click on a nav item (except "home")- it calls "function openContent" - this slides open a panel to reveal content underneath. (also changes the content on the panel "cover_mc")

when you click on "home"- it calls the "shutCover" function. this just shuts the panel and reveals the "home" content on the panel.

it all works fine except for one bug.:

when i click on a nav item, then click on Home, then click back on the nav item that I had clicked on right before i clicked on the home button- the panel wont open. if I click on any other nav items besides the one pressed right before i clicked on the "home" button- they work fine.

im stumped. if anyone has a clue what might be going on- I would really appreciate any help you could provide.

here is the script:


ActionScript Code:
function openContent ( whichContent, pageContent) {
    if (whichContent==currentSection){} //if section is already open do nothing
    else {
    showContent ( whichContent, pageContent );
    currentSection = whichContent;
   
    isSectionOpen = true;
    }
}
 
function prevContent (onStage) {
    trace(onStage)
    prevImage = onStage
   
}
 
function showContent ( whichContent, pageContent ) {
    //currentSection = what is CURRENTLY open and needs to be faded out
    //currentSection = what is CURRENTLY open and needs to be faded out
    //whichContent = what NEEDS to be faded in mother***** 
    if ( isSectionOpen ) {
        var open:Fuse = new Fuse();
        open.push(
            //{func:"btn_off"},
            {scope: this, func:  function() {  _level0 [ currentSection ].scroll.deleteThis(); }  },
            [
           
            {target:_level0 [ "cover_mc" ], _x:520, seconds:1, ease:"easeOutExpo"},
            {target:_level0 [ currentSection], _alpha: 0,seconds:0},
            {target:_level0.cover_mc [ pageContent ], _alpha: 0,seconds:.1},
            {target:_level0.cover_mc [ prevImage ], _alpha: 0,seconds:.1}],
            {target:_level0.cover_mc [ pageContent ], _visible: "false",seconds:0},
            {target:_level0 [ whichContent ], _visible: "true",seconds:0},       
            {scope: this, func:  function() {  _level0 [ whichContent ].scroll.setupScroll(); }  },   
            [{target:_level0 [ "cover_mc" ], _x:1000, seconds:1, ease:"easeOutExpo"},
            {target:_level0 [ whichContent ], _alpha: 100,seconds:.1},
            {target:_level0.cover_mc [ pageContent ], _alpha: 100,seconds:.1},         
            {func:"prevContent" , args:pageContent}]);
        open.start();
    }
    else {
        trace("boom " +_level0 [ currentSection])
        trace("boom boom "+_level0 [ whichContent])
        var open:Fuse = new Fuse();
        open.push(       
             //{func:"btn_off"},
            [{target:_level0 [ "cover_mc" ], _x:1000, seconds:1, ease:"easeOutExpo"},
           
            {target:_level0 [ whichContent ], _alpha: 100,seconds:.1},
{target:_level0.cover_mc [ pageContent ], _alpha: 100,seconds:.1},
           
            {target:_level0.cover_mc.home_image, _alpha: 0,seconds:.1},
           
            {target:_level0.cover_mc [ prevImage ], _alpha: 0,seconds:.1}, 
           
            {func:"prevContent" , args:pageContent}],
           
            { func: function() { isSectionOpen = true; } }  ],
           
            {scope: this, func:  function() {  _level0 [ whichContent ].scroll.setupScroll(); }  }
           
            );
        open.start();
    }
}


ActionScript Code:
function shutCover () {
    isSectionOpen = false;
        var open:Fuse = new Fuse();
        open.push(
        {func: function(){currentSection="home"}},
       
        [   
            //{func:"btn_on"},
            {scope: this, func:  function() {  _level0 [ currentSection ].scroll.deleteThis(); }  },
            {target:_level0 [ "cover_mc" ], _x:520, seconds:1, ease:"easeOutExpo"},
            {target:_level0.cover_mc [ prevImage ], _alpha: 0,seconds:.1},
            {target:_level0.cover_mc.home_image, _alpha: 100,seconds:.1},
            {target:_level0 [ currentSection ], _alpha: 0,seconds:.1}]
            );
        open.start();
}

Fuse Problem
Whem i use Fuse, ZigoEngine, etc... on the timeline it works all fine, but when i start using in classes i get all kinds of errors : the Shortcuts don't work anymore, lots of erros in Sepy...

Does anyone has an example how he/she works with Fuse in classes?

thanks!! / katsu

Fuse Kit Question
I have a question about FuseKit

I'm setting up a function to handle my Fuse animations that I throw at it.

Here's my code

Code:
import com.mosesSupposes.fuse.*;
ZigoEngine.register(Fuse,PennerEasing);

// ---------------- test Fuse function -------------------------
function fuseMe(myFuse:Object) {
var f:Fuse = new Fuse();
f.autoClear = true;
f.push(myFuse);
f.start();
}

//
var easeType:String = "easeOutExpo"
var tweenTime:Number = 1;

var fadeIn:Object = { start_alpha:0, seconds:tweenTime, ease:easeType};
var fadeOut:Object = { alpha:0, seconds:tweenTime, ease:easeType};

fuseMe({target:mc, action:fadeIn});
The above code works great! What I want to do though is be able to pass the fuseMe function a multi item array of animations to do. something like this


Code:
fuseMe({target:mc, action:fadeIn}, {target:mc, action:fadeOut});
Basically I want to pass it an Array of stuff to animate. I don't think I have it written correctly though.
Could someone please test this and get back to me? Thanks!

Copyright © 2005-08 www.BigResource.com, All rights reserved