A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Tell target - but only once?

Hybrid View

  1. #1
    Member
    Join Date
    Aug 2004
    Location
    Stockholm
    Posts
    30

    Tell target - but only once?

    My movie containing five buttons. When clicking on one, a MC shows up with some information then disappear.
    The same should happen on every button but only once. I don't want the visitor to see it every time hitting the buttons.

    Possible?

  2. #2
    Senior Member bs_grewal's Avatar
    Join Date
    Dec 2002
    Posts
    548
    i think u shold check ur Mc's curretntframe and put a condtion there.
    otherwise u need to upload ur fla file
    Thanks
    Baljit Singh Grewal
    Click here to email me
    Messengers: baljit@bsgrewal.com

  3. #3
    Member
    Join Date
    Aug 2004
    Location
    Stockholm
    Posts
    30
    simple sample
    Attached Files Attached Files

  4. #4
    Senior Member sharma's Avatar
    Join Date
    Oct 2004
    Location
    Canadia
    Posts
    1,017
    not sure exactly what your example is suppose to demonstrate..

    but I thought i'd point this out for you..

    your button code:
    code:

    on (release) {
    tellTarget ("_root.mc") {
    gotoAndStop(2);
    }
    }




    should be written like this:
    code:

    on (release) {
    _root.mc.gotoAndStop(2);
    }

    what the hell's a motion tween?

  5. #5
    Senior Member bs_grewal's Avatar
    Join Date
    Dec 2002
    Posts
    548
    updated sample
    Thanks
    Baljit Singh Grewal
    Click here to email me
    Messengers: baljit@bsgrewal.com

  6. #6
    Member
    Join Date
    Aug 2004
    Location
    Stockholm
    Posts
    30
    ok, my sample was not the best.
    when hitting a button a mc with some info shows up and then disappear. This information should come up no matter what button you use. But only the first time.
    After that the buttons are only for navigation.
    Attached Files Attached Files

  7. #7
    Member
    Join Date
    Aug 2004
    Location
    Stockholm
    Posts
    30
    Thanks bs_grewal!

    It works perfect!

  8. #8
    Senior Member sharma's Avatar
    Join Date
    Oct 2004
    Location
    Canadia
    Posts
    1,017
    i simply replaced bs_grewal's trace comands with gotoAndStop actions...

    this is the example code:
    code:

    on (release) {
    if(_root.mc._currentframe==1){
    _root.mc.gotoAndPlay(2);
    _root.content.gotoAndStop(4);
    }else{
    _root.content.gotoAndStop(4);
    }
    }



    and here is the working demo
    what the hell's a motion tween?

  9. #9
    Senior Member sharma's Avatar
    Join Date
    Oct 2004
    Location
    Canadia
    Posts
    1,017
    beat me to it
    oh well
    what the hell's a motion tween?

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