elsassph / eaze-tween

Automatically exported from http://code.google.com/p/eaze-tween - see also active fork in development: https://github.com/mayakwd/as3-eaze-tween
1 stars 0 forks source link

Argument count mismatch only with certain easings #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
With some easings my code doesn't run.
For instance it works with Cubic.easeOut but it doesn't work with 
Elastic.easeOut or Back.easeOut.
I get the error below ("Argument count mismatch").

What steps will reproduce the problem?
1. Run the code below
2. Receive error

What is the expected output? What do you see instead?
I get this error instead of the program running normally
ArgumentError: Error #1063: Argument count mismatch on 
fl.transitions.easing::Elastic$/easeOut(). Expected 4, got 1.
    at aze.motion::EazeTween$/updateTweens()
    at aze.motion::EazeTween$/tick()
(repeated many times)

What version of the product are you using? On what operating system?
Just downloaded RC2. I'm on Adobe Flash CS5.5, Mac OS X 10.7.1

Please provide any additional information below.
Code I am trying to run.

import fl.transitions.Tween;
import fl.transitions.TweenEvent;
import fl.transitions.easing.*;
import flash.display.*;
import flash.geom.Point;
import flash.geom.Rectangle;
import flash.text.*;
import flash.utils.setTimeout;
import aze.motion.*;
import aze.motion.easing.*;

var startWidth:int = 200;
var startHeight:int = 130;
var startLineWidth:int = 5;
var startCenter:Point =  new Point(stage.stageWidth/2, stage.stageHeight/2); 
//new Point(400,300);

//this.stage.scaleMode = StageScaleMode.NO_SCALE;
//this.stage.align = StageAlign.TOP_LEFT;

var mySprite:Sprite = new Sprite();
mySprite.graphics.beginFill(0xF7F3DC);
mySprite.graphics.lineStyle(startLineWidth, 0xD35F72);
mySprite.graphics.drawRect(-startWidth/2, -startHeight/2, startWidth, 
startHeight);
mySprite.graphics.endFill();

mySprite.x = startCenter.x;
mySprite.y = startCenter.y;

mySprite.scaleX = 0;
mySprite.scaleY = 0;

addChild(mySprite);

setTimeout(scaleBig, 1500);

function scaleBig():void
{
    eaze(mySprite).to(2.0, { scale:1 } )
                            .easing(Elastic.easeOut);

}

Original issue reported on code.google.com by gtrive.code@gmail.com on 7 Nov 2011 at 5:15

GoogleCodeExporter commented 9 years ago
The problem is in your code: 
Since you import fl.transitions.easing.*, it happens that Elastic.easeOut 
corresponds to fl.transitions.easing.Elastic.easeOut which isn't compatible 
with aze.motion.easing.Elastic.easeOut.

Original comment by philippe...@gmail.com on 7 Nov 2011 at 5:17

GoogleCodeExporter commented 9 years ago
Thank you -what a stupid mistake.
Sorry about that.

Original comment by gtrive.code@gmail.com on 7 Nov 2011 at 5:20