Jump to content

Search In
  • More options...
Find results that contain...
Find results in...

Multiple Errors in Flash Builder 4.7

Recommended Posts

Hi there,


I upgraded my Flash Builder this morning, and all of a sudden my TweenLite.as is giving off warnings that have NEVER popped up in my life.


It says:


Assignment within conditional. Did you mean == instead of =?


I've tried upgrading to GSAP v12, But instead of 1 error warning, it gave off 10, in different Greensock files... so I went back to 11.


Any solutions?


Really need to get this project finished




Link to comment
Share on other sites

Those are erroneous errors/warnings. It's complaining about a statement like this:


if ((myVariable = obj.whatever)) {



Which is perfectly valid - it just assigns obj.whatever to myVariable and evaluates whether or not it's false/null. It's a more concise way of doing:


myVariable = obj.whatever;
if (myVariable) {



And it can be particularly useful for improving performance when there's an if/elseif statement because if the first part is true, the 2nd condition doesn't even have to get evaluated. For example:


if (isPlaying) {
} else if ((myVariable = obj.getValue())) {
   myVariable.blah = "blah";



If isPlaying is true, then myVariable never gets set to obj.getValue() which also saves us a function call. That's much better than setting myVariable up front and then running the conditions.


See what I mean?


Flash Builder is trying to be helpful and it's assuming that we meant == instead of = because it's in a conditional. Not true in this case. Thanks, Flash Builder, but leave me alone and move along. Nothing to see here. :)


If you're actually getting compiler errors, please let us know and post a very simple example FLA that we can publish to see the errors.


And for the record, I'd definitely recommend v12 over v11. It's rock solid and more feature-packed. The main thing delaying v12's launch is some work we're doing on the JavaScript side of things.

Link to comment
Share on other sites

Wow! Fantastic!


Thanks so much for helping me understand it all. Makes way more sense now.


Definitely a case of Flash Builder trying to be a know it all :)

It was just warnings, so I'm definitely going to upgrade to v12 again.


Thanks so much again for everything, and great work on the platform. Definitely a life saver!




Link to comment
Share on other sites

  • 5 months later...

Hi Shane, 
totally agree with Adobe being silly regarding this.  The problem is, with Air 3.6, it is now impossible to compile IOS apps using Tween* as Adobe INSIST one cannot use your cleverness. 
I fixed this by manually going through your code and doing what you suggest above:


myVariable = obj.whatever;
if (myVariable) {...


Any chance you could incorporate this 'unnecessarily long' way of doing things in future versions?





Link to comment
Share on other sites

  • 2 weeks later...
  • 10 months later...
  • 6 months later...

Is there a solution to this issue?


Using FlashDevelop 4.6.4, I've encountered the same warnings.

I understand that this is a perfectly valid code, but FD halts on this warnings...


Any advice?



Link to comment
Share on other sites

Perhaps contact the FlashDevelop folks? Unfortunately, we have no control over what their IDE does :( I wish I had an easy fix for you, but it definitely seems like it's an issue on their end. 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.