A Flash Developer Resource Site

Results 1 to 7 of 7

Thread: tellTarget - no more!?

  1. #1
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    Hi all

    The script below works sweatly ...

    Code:
    tellTarget(["_root.lives.man" + lives]){
    	gotoAndPlay(2);
    }
    But what would be the proper Flash 5 syntax?

    TIA
    /podenphant

  2. #2
    Senior Member
    Join Date
    Oct 2000
    Posts
    519
    _root["lives.man" + lives].gotoAndPlay(2);

  3. #3
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    hmm ...

    for some reason it doesn't work - this would seem to be kiddy stuff ...

    The variable lives is in the _root.
    The instance lives is also in the _root. Renaming doesn't help.

    got some helpful thoughts?
    /poden

  4. #4
    Senior Member
    Join Date
    Oct 2000
    Posts
    519
    If the variable lives is in the _root level then the syntax would be:

    _root["lives.man" + _root.lives].gotoAndPlay(2);

  5. #5
    Bob (the singing sock)
    Join Date
    Aug 2000
    Location
    Århus, Denmark
    Posts
    472
    Hi julianj

    I don't understand, at all, why your suggestions doesn't work.
    If I can mail you the fla you can spot what I am missing?

    /poden

  6. #6
    Senior Member
    Join Date
    Oct 2000
    Posts
    519
    It ought to work. Send it to:

    [email protected]

    and I'll have a look.

  7. #7
    Senior Member
    Join Date
    Oct 2000
    Posts
    519
    Of course the main reason it didn't work is because I answered the question incorrectly! It should have been:

    _root.lives["man" + _root.lives].gotoAndPlay(2);

    Sorry, half asleep.

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