Hey guys, I'm having a really weird issue here. If someone could help me, I
would be really grateful.
I'm using the Fuse Kit (and ZigoEngine) to do the tweens of my AS2 Ria.
I've a MovieClip which gets stretched up and then after some seconds, needs
to get to its original size.
If I put the actual values of the width and height in the sequence (ex:
width:100,height:100) or typecast the variable to Number (which makes no
sense since it **is** already a Number) Fuse tweens the MovieClip from the
actual width,height to 100,100. However, if I use a variable, Fuse seems to
add to the current width,height, making the MovieClip even bigger instead of
tweening it to its original size.
These values are retrieved from a XML file using PixLib's ConfigLoader
class.
Here's the code:
initWidth:Number = this._initialWidth;
initHeight:Number = this._initialHeight;
var f:Fuse = new Fuse(
{
target:this.view,
start_width:this.view._width,
start_height:this.view._height,
width:initWidth, //If I put a number here, it works
height:initHeight, //If I put a number here, it works
x:this._initialGrid_x,
y:this._initialGrid_y,
ease: "easeOutBack"
});
f.start();
(...)
**However**, if I typecast the initWidth and initHeight like this:
var f:Fuse = new Fuse(
{
target:this.view,
start_width:this.view._width,
start_height:this.view._height,
width:Number(initWidth), //or put the actual value, such as 100
height:Number(initHeight), //or put the actual value, such as 100
x:this._initialGrid_x,
y:this._initialGrid_y,
ease: "easeOutBack"
});
f.start();
(...)
...It works as expected (it "tweens-down" to 100, not adds-up to the current
width,height). However, I have no idea why... could someone enlighten me on
it ?
Thanks in advance,
Marcelo.
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com