A Flash Developer Resource Site

Results 1 to 11 of 11

Thread: TellTarget in Flash5= ? in Flash MX?

  1. #1
    Junior Member
    Join Date
    Jul 2002
    Posts
    4
    Subject is pretty self explanatory, i'm new to MX, and where did the TellTarget command go?

  2. #2
    Junior Member
    Join Date
    Jul 2002
    Posts
    4
    It's under "Depreciated" > "Actions"..go figure

    I always go straight to the "Index" when I cant find something

  3. #3
    Junior Member
    Join Date
    Jul 2002
    Posts
    4

    nm

    Figured it out, nm

  4. #4
    Tai'shar Manetheren! skierbit's Avatar
    Join Date
    Dec 2000
    Location
    Provo, Utah
    Posts
    407

  5. #5
    Senior Member
    Join Date
    Oct 2000
    Posts
    381

    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).

  6. #6
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789

    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...

  7. #7
    Senior Member
    Join Date
    Oct 2000
    Posts
    381

    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?

  8. #8
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789

    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


  9. #9
    Senior Member
    Join Date
    Jan 2002
    Posts
    368
    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.`

  10. #10
    Senior Member
    Join Date
    Oct 2000
    Posts
    381

    wow!

    ...

  11. #11
    Developer
    Join Date
    Sep 2001
    Location
    The Bluegrass State Will Flash For Food ™
    Posts
    3,789
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center