-
Subject is pretty self explanatory, i'm new to MX, and where did the TellTarget command go?
-
It's under "Depreciated" > "Actions"..go figure
I always go straight to the "Index" when I cant find something
-
-
Tai'shar Manetheren!
-
If you use...
... "tell target", you will have no chance by "flashfilmfestival" .
I wouldn´t use it any more. I try not to use "if..." any more ("a?b:c" ist compact) and:
a=a+1 is now a++
a=a+b is now a+=b
a=a/b is now a/=b
you don´t need to do this any more:
a=1;
b=1;
c=1;
you can do this:
a=b=c=1;
etc. I don´t remember any more (yes i do, just javascript notation).
-
Re: If you use...
Originally posted by alberto sejas
I try not to use "if..." any more ("a?b:c" ist compact)
could you explain that one to me...
-
sure...
... the best way is an example, i think:
//old:
if (a>b) {
text = "a is bigger";
} else {
text = "b is bigger";
}
//new:
text= a>b ? "a is bigger" : "b is bigger";
//got it?
-
Re: sure...
Originally posted by alberto sejas
//got it?
interesting, i'll stick to writing it out ...
but how would that work if i wanted to do a gotoAndPlay type thing
Code:
_currentframe != targetframe ? gotoAndPlay(targetframe);
can i put that on multi-lines
[tested]i guess i can
Code:
a>b ? trace("a is bigger") : trace("b is bigger");
//or
if (a>b) { trace("a is bigger"); }else{ trace("b is bigger");
sorry for posting all that rubbish i just think it's interesting as i'm not acustom to doing it that way...
From the Refrence condition ? trueExpression : falseExpression
-
tell target was already deprecated in flash 5. replaced by with.
the tertiary operator ( ? ) is in many programming languages. it compiles to the same thing as an if statement in bytecode. for short simple conditionals it's nice, but compact code doesn't necessarily mean good code.`
-
-
Originally posted by bit-101
but compact code doesn't necessarily mean good code.`
i agree, it's easier to see if or else as apposed ? or : in long blocks of code. and it just make sense when looking at it from a non-programming background.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|