A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Left side of assignment operator must be variable or property. Error Again

  1. #1
    Member
    Join Date
    Jul 2004
    Posts
    52

    Left side of assignment operator must be variable or property. Error Again

    Error Text:

    **Error** Scene=Scene 1, layer=Action Layer, frame=1:Line 127: Left side of assignment operator must be variable or property.
    return(-c * (Math.sqrt(1 - t = t / d * t) - 1) + b);

    What is wrong with this code? Thanks B

  2. #2
    Senior Member
    Join Date
    Aug 2002
    Location
    Dublin, Ireland
    Posts
    1,749
    Math.sqrt(1 - t = t / d * t)
    Two things wrong with that:

    First of all, the = is trying to assign (t/d*t) to (1 - t), which is not very likely. If you meant to test for where (1-t) is equal to (t/d*t) then you should use == instead.

    Secondly, your equation as written doesn't make a lot of sense - if you correct it to == then there are only two possible evaluations to (1-t) == (t/d*t) - true (1) or false (0). Therefore your Math.sqrt can only evaluate to 1 or 0 and so is entirely redundant.

    I suspect you need to put in more parentheses to make it make more sense.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center