开发者

vector class throwing an error after publishing the FLA for generating .ipa from flash cs5

I am creating a flash game for iPhone using Flash CS5, Everything runs smoothly when creating swf via Ctrl+Enter. But when i am attaching .p12 and provisioning profile files and publish the FLA for generating .ipa there is an error thrown by the compiler th开发者_如何学Pythonat is:

"Incorrect number of arguments, Expected no more than 0"

private static function closestVertexOnOBB(p:Vector, r:RectangleParticle):Vector   
{
        var d:Vector = p.minus(r.samp);         
        var q:Vector= new Vector(r.samp.x, r.samp.y);

        for (var i:int = 0; i < 2; i++) 
        {
            var dist:Number = d.dot(r.axes[i]);

            if (dist >= 0) dist = r.extents[i];
            else if (dist < 0) dist = -r.extents[i];

            q.plusEquals(r.axes[i].mult(dist));
        }
        return q;
}

can anyone help please??


The Vector class is actually a native flash class since Flash Player 10 (API docs) and is therefore a class-name so should avoid for our custom classes. we should have different class name rather than the inbuilt flash keywords and class names.:)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜