dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [f8] Easy but I dont know 8

Hybrid View

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Posts
    28

    [f8] Easy but I dont know 8

    Hello Actionscripter

    Do you know how can I tell to more than 1 target ( in my case 10 ) to do the same action, without write the function "tell target" for each target?

    For example:
    I need to say to target T01, T02 and T03, go and stop in frame 1.
    I think I could write the actionscript more or less like this:

    on (release) {
    tellTarget (this.T01, T02, T03)
    {gotoAndStop(1);
    }
    }


    This code didnt work, but I think there are a way more or less like this, wright?
    Ppppplease, tell me how!!!

    Tks


  2. #2
    Member
    Join Date
    Jul 2007
    Posts
    77
    tellTarget is a bit of a flash5 relic, you achieve the same thing using dots (.) to manipulate moveclips eg:

    on (release) {
    T01.gotoAndStop(1)
    T02.gotoAndStop(1)
    T03.gotoAndStop(1)
    }

    or you can use a loop function and target clips dynamically

    i = 0
    while(i++<3){
    this["T0"+i].gotoAndStop(1)
    }
    www.ugonna-nwosu.com
    If at first you don't succeed... Try not to look suprised.

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Posts
    28

    eureca

    ok, it worked well. Tks!

    Ill try to help extinguish the tell target flash 5 relic ( lol ).

    Obrigado!


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